|
Re: Text Substitution and Script: msg#00031editors.sed.user
hi, source will not execute/lunch the script.. It only will source/load the setting into your environment.. What u can do is, change your script to be executable 1)chmod 755 myscript Execute your script 2)./myscript --- Venky Chakravarthy <sas_geek1991@xxxxxxxxx> wrote: > Sed Wizards, > > I have a script that has worked well in a previous > job. However, the same script doesn't work in my > current SunOS: 5.8 setting. First there is a > difference in the way I call the script in my > current > environment: > > /home/myname/ 127> source myscript > > previously I would simply do this as > > /home/myname/ 127> myscript > > What may be some of the system set-up differences > that > necessitates the use of "source"? This difference > per > se is not a big thing. Why does the following script > fail which used to work before? It does not > recognize > "for" and "do". > > cupsas01 /wwbdm/clin/proj/ca/183/maclib/dev/scripts/ > 124> more change1.script > #!/bin/sh > # Perform a global search and replace operation on > all > *.sas files in this directory > > for sas_filename in *.sas > do > sed 's/180/183/g' $sas_filename > > temp_filename > > mv -f temp_filename $sas_filename > done > > Here is the how the script is called and the > messages. > > cupsas01 /wwbdm/clin/proj/ca/183/maclib/dev/scripts/ > 125> source change1.script > for: Command not found. > do: Command not found. > sas_filename: Undefined variable. > > Thanks > > Venky Chakravarthy > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/dkFolB/TM --------------------------------------------------------------------~-> -- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/sed-users/ <*> To unsubscribe from this group, send an email to: sed-users-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Text Substitution and Script: 00031, Venky Chakravarthy |
|---|---|
| Next by Date: | Re: multi-byte character sets in sed: 00031, hq00e |
| Previous by Thread: | Text Substitution and Scripti: 00031, Venky Chakravarthy |
| Next by Thread: | Re: Text Substitution and Script: 00031, Venky Chakravarthy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |