getting text out of a file

Hi all,

I have a script which tails the last line of a log - works fine, what i would like todo is take some of the text out of this line and then put into a string, i.e

1234544 sesslogged : 1234 : here

so want to 'get' 1234 , then add to 'operators currently working 1234

Hope that makes sense

ta

steve

could you please describe your problem in brief, what kind of text you need to cut and on what condition.

play with:

tail -1 filename | cut -f2 -d:

Pretty sure that's what you're after.
Hope it helps.

Cheers,
Cameron

Thanks Cameron, Played with the command and working a treat.

Cheers !!