On Thursday 05 April 2001 15:52, you wrote:
> Hi to all,
>
> If I have a file with the following data:
>
> listen <010:atm1.7530>
> listen <010:atm120.7080>
> listen <010:nac1.7506>
> listen <010:ist1.7508>
> listen <010:tar.7501>
> listen <010:nacpos.7510>
>
> How I can extract of the second column since ':' to '.'
> example:
> <010:atm1.7530> atm1
> <010:atm120.7080> atm120
>
> I think with the command awk I can do that.. but right now I don't have any
> idea....
>
> Can anybody help me?
>
>
> Thanks in advance
cat datafilename | gawk -F: '{ print $2 }' | gawk -F. '{ print $1 }' > outfile
then it will have the contents in outfile that you desire.
Civileme
Yeh, one-line filters are common for something that would be a hairy VB job.