10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How would you grep for a line containing only 5 numbers? Something like this.
10 2 12 1 13 (4 Replies)
Discussion started by: cokedude
2. UNIX for Dummies Questions & Answers
I have opened a log file through Vi editor in putty itself and I was searching for a pattern in logs , let say 'ABCD'
then I want to come out from vi editor, Please advise what is the command to come out from unix editor..! (1 Reply)
Discussion started by: KAREENA18
3. Shell Programming and Scripting
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are
hello how are you?
How about you?
I'm trying to get the following output..
1 hello how are you?
2 I'm fine.
3 How about you? ... (8 Replies)
Discussion started by: abk07
4. UNIX for Dummies Questions & Answers
I know if i use grep -n that the output will have the lines numbered but is there a way to grep the actually line number.
so like this
grep -n "one" /usr/dict/numbers
... (1 Reply)
Discussion started by: alindner
5. Shell Programming and Scripting
hi there ,
i m new to unix , i d like to ask how can a get only even numbered lines matches with the word i search from txt file
for example :
3461:1.D. The copyright laws of the place where you are located also govern
3471:1.E. Unless you have removed all references to Project... (17 Replies)
Discussion started by: brhn
6. Shell Programming and Scripting
How to get line numbers when we more on a file in LINUX
firestar (1 Reply)
Discussion started by: firestar
7. Shell Programming and Scripting
I have a file consisting of lines in such a format: separated by space and M1 EOS for fullstop (.) ]
M3 an (4 Replies)
Discussion started by: my_Perl
8. UNIX for Advanced & Expert Users
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Discussion started by: rudoraj
9. Shell Programming and Scripting
I have got one file ...
I want to add line numbers with space form starting to ending..
for example...if the file is
sand sorcd 2345 345
recds 234 234 5687
yeres 568 988 erfg4 67
I need the output
... (4 Replies)
Discussion started by: esham
10. UNIX for Dummies Questions & Answers
Maybe this question is out there, but I searched and didnt see it.
To print my files I use
more filename | lpr -Pprinter
I would like to print my scripts with line numbers.
How do I do this? (2 Replies)
Discussion started by: MizzGail