|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
C-shell script problem?
here is my code.and i cannt find it out what's goin on?
#!/bin/csh set length="wc -l" set header="grep -i origin" $file @ans=$length - $header tail -$ans $file basically, what i am trying to do is i want to print it out all the stuff after the word "ORIGIN" in a txtfile. anyone has any suggestions to fix it? thanx very much plz either post it here or emal me:kissmegoodbey@yahoo.com thanx very much |
|
#2
|
|||
|
|||
|
If you really want to print everything in the text file after "ORIGIN'
sed will probably work for you sed -n -e '1,/ORIGIN/!{p;}' file or sed -n -e '/ORIGIN/,${p;}' file if you want the line containing ORIGIN also. - Finnbarr |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > C-shell script problem? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|