![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| bash. convert mpeg adts to normal mp3 | stahoo23 | Shell Programming and Scripting | 5 | 05-18-2008 02:26 AM |
| what are some different commands in c shell and korn shell?? | EquinoX | UNIX for Dummies Questions & Answers | 1 | 01-28-2008 09:14 PM |
| bourne shell or korn shell? | XZOR | UNIX for Dummies Questions & Answers | 2 | 10-05-2006 11:34 PM |
| How to Convert scientific notation to normal ? | maheshsri | Shell Programming and Scripting | 2 | 01-05-2006 10:33 AM |
| KORN Shell - Spawn new shell with commands | frustrated1 | Shell Programming and Scripting | 2 | 04-20-2005 11:23 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to convert from korn shell to normal shell with this code?
well i have this code here..and it works fine in kornshell..
#!/bin/ksh home=c:/..../ input=$1 sed '1,3d' $input > $1.out line="" cat $1.out | while read a do line="$line $a" done echo $line > $1 rm $1.out however...now i want it just in normal sh mode..how to convert this? any help? thanks! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Quote:
and if you had run it under your 'normal' sh, what kind of issue you encountered? |
|
#3
|
|||
|
|||
|
oh its bourne shell as in #!/bin/sh
|
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
|||
|
|||
|
well....its this part i guess...or maybe other part of the lines...as im a newbie..what i think was this line that cause the error....
cat $1.out | while read a do line="$line $a" done the line will not combine...as in the code here "$line Sa" will not execute |
|
#6
|
||||
|
||||
|
Quote:
could you post the content of your '$1' file, pls? |
|
#7
|
|||
|
|||
|
ok..my output was something similar to this..
abc abc abc and when i run this ...i will get abc abc abc... i can get this in korn shell ..but not in bourne..dun know why,, |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|