10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file from which I want to cut out specific columns. If the second column equals one, I want to cut out columns 1 and 5 and 6. If the second column equals two, I want to cut out columns 1 and 5 and 7. How do I go about doing that? Thanks! (4 Replies)
Discussion started by: evelibertine
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a space de-limited text file. In the fifth column, I would like to switch "1"s with "2"s. How do I go about doing that? Thanks!
Sample input:
0 311000259 0 0 1 1
0 311000397 0 0 1 2
0 311000491 0 0 2 1
0 311000516 0 0 2 1
0 311000541 0 0 1 1
0 311000558 0 0 2 1
0 311000566 0... (1 Reply)
Discussion started by: evelibertine
1 Replies
3. UNIX for Dummies Questions & Answers
I would like to add a line to the end of a single column text file. How do I go about doing that?
Input:
BEGIN
1
2
3
Output:
BEGIN
1
2
3
END
Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
4. UNIX for Dummies Questions & Answers
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Discussion started by: evelibertine
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I would like to use sed to replace NA to x ('s/NA/x/g'), but only in the 5th column of the space delimited text file, nowhere else. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a text file in the following format:
Code:
13412 NA06985 0 0 2 46.6432798439 4 4 4 4
13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4
13412 NA06993 0 0 1 45.8022601455 4 4 2 4
13401 NA06994 0 0 1 48.780669145 4 4 4 4
13401 NA07000 0 0 2 47.7312017846 2 4 4 4 ... (2 Replies)
Discussion started by: evelibertine
2 Replies
7. UNIX for Dummies Questions & Answers
I have a text file in the following format:
13412 NA06985 0 0 2 46.6432798439 4 4 4 4
13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4
13412 NA06993 0 0 1 45.8022601455 4 4 2 4
13401 NA06994 0 0 1 48.780669145 4 4 4 4
13401 NA07000 0 0 2 47.7312017846 2 4 4 4
13402 NA07019... (3 Replies)
Discussion started by: evelibertine
3 Replies
8. Shell Programming and Scripting
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Discussion started by: goodbenito
2 Replies
9. Shell Programming and Scripting
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Discussion started by: DionDeVille
4 Replies
10. Shell Programming and Scripting
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
Discussion started by: Issemael
5 Replies