Actually, the line won't work in perl *as written* because two details are wrong: 1. y is not a legal variable name in perl; it has to be $y 2. in perl, lines have to end with semi-colons The line that will work the way Richard describes is: $y=`grep "some string" file | tail -n 1 | cut -b5-10` ; $y will then contain the output of the cut command, as you will be able to see if you follow that line, in your program file, with this one: print "$y\n" ; At 04:44 PM 2/20/99 +0000, Richard Adams wrote [excerpts only]: >According to Raider: >> Could someone tell me hwo this script line: >> y=`grep "some string" file | tail -n 1 | cut -b5-10` >What you write will not only work in perl but realy in any shell. >The line does (when called); > >greps for "some string" in "file" tails the output with only the last line, >then "cut" only prints the bytes in that line from the 5th char to the 10th >char. ------------------------------------"Never tell me the odds!"--- Ray Olszewski -- Han Solo 762 Garland Drive Palo Alto, CA 94303-3603 650.321.3561 voice 650.322.1209 fax [EMAIL PROTECTED] ----------------------------------------------------------------
