10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All,
This is a noob question. I tried searching for the answer but the answer found did not help me .
I have a file that can have duplicates.
100
200
300
400
100
150
the number 100 is duplicated twice. I want to find the duplicate along with the line number.
expected... (4 Replies)
Discussion started by: vatigers
4 Replies
2. Shell Programming and Scripting
Hi,
I need to number the lines in my text file. I know how to do this with standard numbering (1,2,3,4, etc) but I need to count in multiples of 5, beginning 0,5,10,15...
example existing file:
abcd
efg
hijklm
nopqrs
desired output
0 abcd
5 efg
10 hijklm
15 ... (11 Replies)
Discussion started by: livbaddeley
11 Replies
3. Shell Programming and Scripting
Hi All,
I have one file name called test.txt and its having numbers inside the file.I need to identified next available number with use of unix shell scipt and have to update next available number with use of unix shell script.
Example:-
cat test.txt
5001
5002
5003
5005
7000
7001
... (5 Replies)
Discussion started by: susindram
5 Replies
4. Shell Programming and Scripting
Hello friends,
Is there any way to split file from n to n+6 into 1 file and (n+7) to (n+16) into other file etc.
f.e I have source pipe delimated file with 20 lines and i need to split 1-6 in file1 and 7-16 in file2 and 17-20 in file 3
I need to split into fixed number of file like 4 files... (2 Replies)
Discussion started by: Rizzu155
2 Replies
5. Shell Programming and Scripting
i have applied the following command on a file named unix.txt that contains the string "linux from the text"
grep -n -i -w "linux from the text" unix.txt
and the result is
5:Today's Linux from the text systems are split into various branches, developed over time by AT&T as well as various... (5 Replies)
Discussion started by: arindamlive
5 Replies
6. 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?
I'm fine.
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
8 Replies
7. Shell Programming and Scripting
Gurus,
I have the following file in csv format, to be convert from cvs to excel.
abc,summer,tennis,123456789,winter
clearsky,fall,computer,43322,monitor
I need to place commas on numbers so that they be read properly in excel.
The number column output I need to see in excel should... (8 Replies)
Discussion started by: clearcase123
8 Replies
8. UNIX for Dummies Questions & Answers
Hello everyone !
Ive searched everywhere and still havnt found enough information to help me overcome (what seems like) a small problem
I have created a temporary file in which i store numbers which a seperated by a space, eg)
5 10 46
23 866 392
i wish to take the numbers for each line... (2 Replies)
Discussion started by: healwithchaos
2 Replies
9. Shell Programming and Scripting
Hi all
How to add line numbers in text file..
ex
abcd
cdef
result
1. abcd
2. cdef
thx in advance (4 Replies)
Discussion started by: suryanarayana
4 Replies
10. Shell Programming and Scripting
i have this text file name test.txt which contain :
aaaaa bbb
iiiiiiiiiiiii ccf
ddaaa ddd
and i need a script that can print out the line numbers using a while loop..
so when the script is run..it will have this:
1
2
3
any ideas? :) thanks guys (4 Replies)
Discussion started by: forevercalz
4 Replies