![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell differences? | hi2_t | UNIX for Dummies Questions & Answers | 2 | 09-09-2009 11:42 AM |
| bash shell: 'exec', 'eval', 'source' - looking for help to understand | alex_5161 | Shell Programming and Scripting | 3 | 07-24-2008 01:42 PM |
| C shell & Bourne Shell | jsm66 | Shell Programming and Scripting | 3 | 02-12-2007 03:19 AM |
| bourne shell or korn shell? | XZOR | UNIX for Dummies Questions & Answers | 2 | 10-06-2006 03:34 AM |
| Bourne-again shell | mrsamer | UNIX for Dummies Questions & Answers | 3 | 09-30-2006 03:42 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I need to understand the differences between the bash shell and the Bourne shell
I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done.
I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and the proprietary software that I was using can not be used on Win 7. I downloaded cygdrive so that I could continue to run several awk and sed scripts I have written. These worked fine in my old Bourne shell (sh) 1st Question/comment. I have seen that #!/bin/bash must be the first line of a script. I see this as a comment not a command. Seems to me that there is confusion either on my part or the rest of the world. The previous permissions on my script were lost probably due to windows. I changed my script "trans_xy" to full permissions "trans_xy" Code:
#!/bin/bash # I think this command is BS > debug effort
# Process XY data
echo Process XY data
#cp 60-121130-01r2_ipc.net ipc # debug attempt ipc exist
sed s/" -"/" DOT."/ ipc > raw
awk '$2~/MTG/{print $0}' ipc > mtg
awk '$2~/TP/{print $0}' ipc > tp
awk '$3~/DOT/{print $0}' raw > raw1
awk '$2~/VIA/{print $0}' raw1 > vias
awk '$2!~/VIA/{print $0}' raw1 > raw_xy
sed s/"R180"/" R180"/g raw_xy > raw_xy_1
sed s/"R270"/" R270"/g raw_xy_1 > raw_xy_2
ls -l trans_xy -rwxrwxrwx the result copied from the bash window intresting font from the stdout Code:
$ ./trans_xy Process XY data : No such file or directory : No such file or directory : No such file or directory : No such file or directory : No such file or directory : No such file or directory : No such file or directory_1 : No such file or directory_2 I suspect that bash does not know to do it's work in the pwd it seems odd that the output file is referenced in the crude error message displayed on the stdout. Notice that the error message is screwed up command from script sed s/"R180"/" R180"/g raw_xy > raw_xy_1 result : No such file or directory_1 command from script sed s/"R270"/" R270"/g raw_xy_1 > raw_xy_2 result : No such file or directory_2 Does anyone know if what the heck is happening here? Last edited by pludi; 3 Weeks Ago at 01:35 PM.. Reason: cleanup |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|