<?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: Not An Identifier in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985622#M923151</link>
    <description>Hi. Thanks for the prompt reply..but something still bugs me:&lt;BR /&gt;&lt;BR /&gt;1. So is the ^M that's causing the 2 errors which I have mention? Will removing it solve the errors? Why [10] and [14](not an identifier) has an error?&lt;BR /&gt;&lt;BR /&gt;2. I thought the ^M serves a purpose, that is to act as an automtic &lt;ENTER&gt; function. So how do I distinguish whether which ^M is the result of ftp in binary mode and which serves at the &lt;ENTER&gt; function?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;BR /&gt;&lt;BR /&gt;Ryan&lt;/ENTER&gt;&lt;/ENTER&gt;</description>
    <pubDate>Sat, 31 May 2003 07:26:37 GMT</pubDate>
    <dc:creator>Ryan_102</dc:creator>
    <dc:date>2003-05-31T07:26:37Z</dc:date>
    <item>
      <title>Not An Identifier</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985619#M923148</link>
      <description>Hi, I'm new to the unix environment, and now i'm stuck with trying to rectify the problem below. Hope someone can help me out:&lt;BR /&gt;&lt;BR /&gt;I'm suppose to run a cron job that reads and executes the script: sh_download.sh. The content of the script is:&lt;BR /&gt;&lt;BR /&gt;#!bin/sh&lt;BR /&gt;###############################################&lt;BR /&gt;# Shell Script  :  sh_download.sh&lt;BR /&gt;# Purpose :  To schedule all the download job # with FTP to get the data file from NT server&lt;BR /&gt;# By:Ryan&lt;BR /&gt;# To schedule   :  Create cron job for &lt;BR /&gt;#sh_download.sh,&amp;lt; change the mode&amp;gt;&lt;BR /&gt;###############################################&lt;BR /&gt;&lt;BR /&gt;LOCAL_FILES="/home/db01"&lt;BR /&gt;BCK_FILES="/home/db01/backup"&lt;BR /&gt;ORACLE_HOME="/orasw2/appl/oracle/product/8.1.7"&lt;BR /&gt;export ORACLE_HOME&lt;BR /&gt;&lt;BR /&gt;DATE1=`date +"%d%m%Y%H%M%S"`&lt;BR /&gt;DATE=`date +"%y%m%d%H%M"`&lt;BR /&gt;echo $DATE&lt;BR /&gt;echo $DATE1 &lt;BR /&gt;&lt;BR /&gt;sqlplus -s scott/tiger@test &amp;lt;&amp;lt; !&lt;BR /&gt;&lt;BR /&gt;@ $LOCAL_FILES/mth_pdb.sql&lt;BR /&gt;&lt;BR /&gt;exit&lt;BR /&gt;!&lt;BR /&gt;sh $LOCAL_FILES\unix_to_mth.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When the above job is run, there are 2 errors:&lt;BR /&gt;&lt;BR /&gt;/home/sodb01/so/mha/sh_download.sh[10]: ^M: not found&lt;BR /&gt;&lt;BR /&gt;/home/sodb01/so/mha/sh_download.sh[14]: ORACLE_HOME^M: This is not an identifier&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can someone help to explain the errors? And what is ^M&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;Ryan</description>
      <pubDate>Sat, 31 May 2003 06:19:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985619#M923148</guid>
      <dc:creator>Ryan_102</dc:creator>
      <dc:date>2003-05-31T06:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Not An Identifier</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985620#M923149</link>
      <description>Hi Ryan,&lt;BR /&gt;the ^M indicates that the file has been ftp'ed from Windows/NT without char conversion; probably done with ftp "bin-command". You can convert the chars of the script by running the command dos2ux like this:&lt;BR /&gt;# dos2ux sh_download.sh &amp;gt;new_sh_download.sh&lt;BR /&gt;&lt;BR /&gt;However, you can also ftp the script again. I assume that you have given the ftp command "bin". Do not, as unix should be able to  figure out the correct conversion itself. &lt;BR /&gt;&lt;BR /&gt;You should also correct the first line:&lt;BR /&gt;#!bin/sh&lt;BR /&gt;should probably be:&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Sat, 31 May 2003 06:37:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985620#M923149</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-05-31T06:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Not An Identifier</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985621#M923150</link>
      <description>Hi Ryan,&lt;BR /&gt;&lt;BR /&gt;The ^M is a control character, normally seen when you ftp a file from a Windows OS to a Unix OS. It appears your script has been ftp'd in this way. To remove these from the script use:&lt;BR /&gt;&lt;BR /&gt;# cat sh_download.sh|sed -e 's/.$//' &amp;gt; sh_download_new.sh&lt;BR /&gt;&lt;BR /&gt;You can then test the new script and if it works move it into place. Use a tool like vi on the original script to see the control character at the end of each line.&lt;BR /&gt;&lt;BR /&gt;A brief discussion of this can be found in this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd39419434a69d711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd39419434a69d711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;James.</description>
      <pubDate>Sat, 31 May 2003 06:39:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985621#M923150</guid>
      <dc:creator>James Murtagh</dc:creator>
      <dc:date>2003-05-31T06:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Not An Identifier</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985622#M923151</link>
      <description>Hi. Thanks for the prompt reply..but something still bugs me:&lt;BR /&gt;&lt;BR /&gt;1. So is the ^M that's causing the 2 errors which I have mention? Will removing it solve the errors? Why [10] and [14](not an identifier) has an error?&lt;BR /&gt;&lt;BR /&gt;2. I thought the ^M serves a purpose, that is to act as an automtic &lt;ENTER&gt; function. So how do I distinguish whether which ^M is the result of ftp in binary mode and which serves at the &lt;ENTER&gt; function?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;BR /&gt;&lt;BR /&gt;Ryan&lt;/ENTER&gt;&lt;/ENTER&gt;</description>
      <pubDate>Sat, 31 May 2003 07:26:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985622#M923151</guid>
      <dc:creator>Ryan_102</dc:creator>
      <dc:date>2003-05-31T07:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not An Identifier</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985623#M923152</link>
      <description>When dos files are transferred to unix they are have ^M appended.&lt;BR /&gt;&lt;BR /&gt;To convert those files to unix format&lt;BR /&gt;use&lt;BR /&gt;&lt;BR /&gt;#dos2unix source-file desti-file</description>
      <pubDate>Sat, 31 May 2003 07:36:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985623#M923152</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-05-31T07:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Not An Identifier</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985624#M923153</link>
      <description>^M is an artifact from playing two unrelated opsystems together. In Unix, a plain ASCII file has a single EOL (end-of-line or line terminator) character: LF of linefeed. However, DOS and other PCwindows systems use CR (carriage-return) plus LF fo their ASCII files. There is no reaso to assume that any major opsystem has a comnpatible file format, which is why there is the ASCII translator built into ftp. Just issue ASCII as a command and transfer ASCII files.&lt;BR /&gt;&lt;BR /&gt;This is a 2way street. Transfer and ASCII file from Unix to a PCwindows system using BINARY and Notepad will display black squares for each LF character. Now Wordpad and Word4Windows will APPEAR to display correctly but the lone LF character is called a soft carriage return which has special meanings within the word processors.&lt;BR /&gt;&lt;BR /&gt;SO, ALWAYS use ASCII when transferring ASCII files--ftp eliminates the incompatibility issues.&lt;BR /&gt;&lt;BR /&gt;And the correct path for sh (the POSIX shell) is not /bin/sh, it is /usr/bin/sh (been that way for a decade in HP-UX). The reason that /bin/sh works is that there is a transition link at /bin (which is not a directory at all) pointing to /usr/bin. Same with /lib. Unix systems conforning to V.4 filesystem layouts follow this convention. But most important, symlinks happen to be the default--they *WILL* change to an optional feature in future releases (HP has stated this several times). Time to upgrade your script headers...</description>
      <pubDate>Sat, 31 May 2003 16:17:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/not-an-identifier/m-p/2985624#M923153</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-05-31T16:17:55Z</dc:date>
    </item>
  </channel>
</rss>

