Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Unix - export command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Fri Mar 01, 2013 4:03 pm    Post subject: Unix - export command
Reply with quote

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
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Mon Mar 04, 2013 11:56 am    Post subject:
Reply with quote

Hello,
After a few hours of searching the web, I was able to spot my mistake. icon_mad.gif
The script was created on windows and FTP'ed to Unix, the carriage return \r from windows was causing the problem.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Mar 05, 2013 4:58 pm    Post subject:
Reply with quote

Glad, you got it working!

PS.: Just in case, you were walking alone! icon_biggrin.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Tue Mar 05, 2013 7:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us