<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sdetable -o create_view command in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153704#M8584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I swapped out my "^" with the "\" and the view scripts worked like a charm.&amp;nbsp; So, thank you very much for the tip.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more thing, can you create a shell script to run multiple shell scripts and log each one.&amp;nbsp; We have been doing this with a&amp;nbsp; bat file that will run each create view bat file and log each one.&amp;nbsp; It worked well and I was wondering if you could do the same thing in UNIX.&amp;nbsp; I just don't know the language.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Todd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Aug 2011 16:16:22 GMT</pubDate>
    <dc:creator>ToddMcNeil1</dc:creator>
    <dc:date>2011-08-09T16:16:22Z</dc:date>
    <item>
      <title>sdetable -o create_view command</title>
      <link>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153701#M8581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have batch files on a windows 2003 server that I would like to run on a unix server without making edits to the bat files.&amp;nbsp; The bat files have the "^" character to show a carriage return or new line.&amp;nbsp; For example,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sdetable -o create_view ^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-T PLACE_HOUSING_VW ^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-t PLACE,PLACE_HOUSING ^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-c PLACE.objectid,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLACE.GEOID,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLACE.STATE,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLACE.STUSAB,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLACE.PLACE,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLACE.NAME,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B25002EST1,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B25002EST2,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B25002EST2_PCT,^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PLACE.shape ^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-w "PLACE.GEOID = PLACE_HOUSING.GEOID(+)" ^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-u ACS_5YR_2009 ^&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-p ACS5YR2009&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What would I replace the "^" symbol with to get these bat files to run as a unix shell script?&amp;nbsp; Right now, I have to take out all of the "^" characters and have the entire command on one line.&amp;nbsp; It works, but is extremely time consuming to fix and manage.&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 17:08:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153701#M8581</guid>
      <dc:creator>ToddMcNeil1</dc:creator>
      <dc:date>2011-08-03T17:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: sdetable -o create_view command</title>
      <link>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153702#M8582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The caret (^) is a DOS line continuation character. The Unix shell continuation is a &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;backslash (\). So to port your script you'd need to do a global replace. The following&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;would work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
 cat foo.bat | sed 's:\^$:\\:' &amp;gt; foo.sh
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Caret is regexp special character, as is backslash, so they need to be escaped; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the dollar sign matches end-of-line, so this won't alter non-terminal carets the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;way "tr '^' '\\'" would.]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As always with Unix, there's many ways to do this -- You could also use 'vi' remove all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the terminal carets (:1,$s/\^$//) and concatenate the lines with auto-repeat of "J".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153702#M8582</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-12-11T08:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: sdetable -o create_view command</title>
      <link>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153703#M8583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was using your instructions to create a SDE View from one to many relationship Feature classes posted on &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2284&amp;amp;t=279941"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2284&amp;amp;t=279941&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked well. I just want to thank you and ESRI forthis help, saving our time and hardships.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mahinda&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:38:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153703#M8583</guid>
      <dc:creator>MahindaAbeykoon</dc:creator>
      <dc:date>2011-08-05T12:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: sdetable -o create_view command</title>
      <link>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153704#M8584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I swapped out my "^" with the "\" and the view scripts worked like a charm.&amp;nbsp; So, thank you very much for the tip.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more thing, can you create a shell script to run multiple shell scripts and log each one.&amp;nbsp; We have been doing this with a&amp;nbsp; bat file that will run each create view bat file and log each one.&amp;nbsp; It worked well and I was wondering if you could do the same thing in UNIX.&amp;nbsp; I just don't know the language.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Todd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 16:16:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153704#M8584</guid>
      <dc:creator>ToddMcNeil1</dc:creator>
      <dc:date>2011-08-09T16:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: sdetable -o create_view command</title>
      <link>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153705#M8585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are four or five different Unix shells, and all of them have more capability than DOS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(it's not even close). DOS borrowed Borne shell's redirection operators, so a script to run &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;all scripts in a directory, logging both stdout and stderr to different timestamped files in &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bourne would look like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
#!/bin/sh
# RunAll.sh - Execute all *.sh scripts in current directory (except this one)
d=`date "+%Y%m%d"`
for s in `ls *.sh`
do
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test `basename $s` = `basename $0` &amp;amp;&amp;amp; continue
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Executing script '$s'..."
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log1=`basename $s .sh`-${d}.log
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log2=`basename $s .sh`-${d}.err
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ./$s &amp;gt; $log1 2&amp;gt; $log2
done
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are any number of good books and websites for shell tyros (though my favorite&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;book is no longer in print).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: To put both STDOUT and STDERR in the same file, use "./$s &amp;gt; $log1 2&amp;gt;&amp;amp;1"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:13:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sdetable-o-create-view-command/m-p/153705#M8585</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-12-11T08:13:15Z</dc:date>
    </item>
  </channel>
</rss>

