10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
if we execute :set nu in vi mode, it displays the line numbers. so how to make this permanently in a file.
Whenever i execute cat , the line numbers should be there. please help me.
thanks (4 Replies)
Discussion started by: pandeesh
2. Shell Programming and Scripting
a file called test :
how to :
.......... (3 Replies)
Discussion started by: eawedat
3. Shell Programming and Scripting
All I need to do is number a file.
The file looks like this
what I want to do is number it so that theres a numerical value beside the >.
JKJKJKKKKKKJJJ (2 Replies)
Discussion started by: kylle345
4. UNIX for Dummies Questions & Answers
I am using ghostscript to convert a multi-page pdf file to individual jpg files. I am wondering if there is a way to get ghostscript to start numbering the output jpg files from zero? What i am trying to convey is that it starts naming my files from page_001.jpg, page_002.jpg, etc., and would like... (0 Replies)
Discussion started by: RacerX
5. Shell Programming and Scripting
I have a simple text file.
I want to number each line in that file .
My text file is
My output should be
2 my file
3 test (5 Replies)
Discussion started by: pitagi
6. Shell Programming and Scripting
hello again guys,
I tried to make a script but due to array's limitations I didn't succeed...so I'm asking you :)
I need numbering the lines according to date (everyday I need to restart the counter)
ABCBD 20080101 XXX 1
FSDFD 20080101 BBB 2
FSDFD 20080102 HHH 1
and so... (3 Replies)
Discussion started by: elionba82
7. Shell Programming and Scripting
Running into a little problem with blank lines.
My file is of this format:
To number each line of the file i would use:
echo "$FILE" |
while read line
echo "$n) $line"
n=`expr $n + 1`
But really, i dont want to number the blank lines.
What i've tried is to use sed... (13 Replies)
Discussion started by: omgsomuchppl
8. UNIX for Dummies Questions & Answers
Is there a way to number lines and use something other than ":" to separate the number from the line?
Or can anyone recommend a way to replace the ":" with a tab?
Here's what I'm working with:
16865:22.09... (1 Reply)
Discussion started by: jdolny
9. Shell Programming and Scripting
I want get numbered lines from a file. and i can do it with: sed = file.txt | sed "/./N; s/\n/ /" | sed -n "5,7p"
but the output that i get is something similar to:
and i want something like this (with 2points after the number):
5:... (6 Replies)
Discussion started by: vibra
10. Shell Programming and Scripting
I need to number the lines in a file.
I tried using "set nu" in the vi editor, but it is only temporary.
Can anyone help me please.
Thanx in advance.
MK (4 Replies)
Discussion started by: minazk