According to Raider: While burning my CPU.
> 
>       Hi!
>       I plann to make a script which will give me a report about my ppp
> connection and about mail trafic.  I think I can do that with the usual
> *nix tools.  But I see this as an excelent idea to learn perl.  I have the
> HTML perl documentation for 5.005 (I have perl 5.003).  But it seems I
> need some interctive help as well.
>       Could someone tell me hwo this script line:
> y=`grep "some string" file | tail -n 1 | cut -b5-10`
>       Sorry if you think this message is off-topic.
>       BTW: Can you tell me if there is some perl-newbie list?  I have
> only mail so it's pretty hard to search (so far no result).

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.

To execute that line you could use;

if [ "$y" = "pipos" ]; then
 echo $y
else
 echo "Another word was found other than pipos."
fi

So the y= was looking for the word "pipos"

> 
>       Raider
> --
>               ``Liberate tu-temet ex inferis''
> 


-- 
Regards Richard.
[EMAIL PROTECTED]

Reply via email to