Hi All
I have a script which has produced a list, I have used 'sed' to number my list, but i want to list at end of line with the first line starting at zero (0) and brackets round it
ie
My List i want
Hello (0)
this (1)
day (2)
can (3)
be (4)
sed '/./=' filename | sed '/./N; s/\n/) /'
Result i am getting using above sed command
1)Hello
2)this
3)day
Thanks if you can sort it.
Any command will do.
Chassis
Thanx for the quick reply, it works, but when i use that it repeats my list adding the last line each time through the loop until it goes through what info i need to extract, so if my list is very large it will number it for ever.
ie
1
1
2
1
2
3
1
2
3
4
1
2
3
4
5
and so on
but i will play around with it, me and command 'awk' are not the best of friends...lol
Thank you
Chassis