View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
There is a shell script(bourne)
Code: |
#!/bin/sh
set -x
export _flag1=YES
echo '_FLAG is set to -> ' $_flag1 |
But it comes with the below error - 'not a valid identifier `
Code: |
$ sh test2.sh
+ export _flag1=YES $'\r'
+ _flag1=YES
': not a valid identifier `
+ echo '_FLAG is set to -> ' YES
_FLAG is set to -> YES |
I know little unix but a noob in scripting. Could you please let me know the reason for this error.
Thanks & Regards, |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
After a few hours of searching the web, I was able to spot my mistake.
The script was created on windows and FTP'ed to Unix, the carriage return \r from windows was causing the problem. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Glad, you got it working!
PS.: Just in case, you were walking alone! |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
appreciate the company :-)
I guess I need more people to walk along and help out with these scripts on mainframe Unix thingy.
toddling now.. |
|
Back to top |
|
|
|