10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
What is the proper syntax to add specific text to a column in a file? Both the input and output below are tab-delineated. What if there are multiple text/fields, such as /CP&/2 /CM&/3 /AA&/4 Thank you :).
sed 's/*/Index&/1' del.txt.hg19_multianno.txt > matrix.del.txt (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hello everyone,
want to merge 2 last columns 3rd and 4rd (if it exists).
I have this
1;2;1;1
2;3;1;1
1;1;2
1;2;3;4
1;1;2
1;2;3;1
Desired output:
1;2;1 1
2;3;1 1
1;1;2
1;2;3 4
1;1;2
1;2;3 1 (3 Replies)
Discussion started by: satir
3 Replies
3. UNIX for Dummies Questions & Answers
An extension from an earlier question. Now need a sed script to delete columns 7,15 and 16 from an example txt below..
Again, thanks in advance.
98M-01.WAV,98M,01,00:00:49,01:07:36:00,"MIX",,"BOOM-MKH50",,,,,,,,,,"",
98L-01.WAV,98L,01,00:00:51,01:01:45:00,"MIX",,"BOOM-MKH50",,,,,,,,,,"", (7 Replies)
Discussion started by: Vrc2250
7 Replies
4. Shell Programming and Scripting
hello everyone !
i face the following problem as i use sed to ignore some columns of an output.
the command i use is
sed 's/^\(*\) \(*\).*/\1 \2/'
as i only want the 2 first columns the command finger returns
the problem is that for some lines the results are fine but for other lines... (8 Replies)
Discussion started by: vlm
8 Replies
5. Shell Programming and Scripting
Hello,
I would like to remove the first column of lines beginning by a character (in my case is an open square bracket) and finishing by a space (or any other delimiter).
For example:
string1 string2 string3
to
string2 string3
I found this previous topic:
... (1 Reply)
Discussion started by: stoyanova
1 Replies
6. Shell Programming and Scripting
Hello experts,
I am new to this group and to 'SED' and 'AWK'. I have data (text file) with 5 columns (C_1-5) and 100s of lines (only 10 lines are shown below as an example). I have to find or select only the id numbers (C-1) of specific lines with '90' in the same line (of C_3) AND with '20' in... (6 Replies)
Discussion started by: kamskamu
6 Replies
7. Shell Programming and Scripting
Hello, I have the following file, but one of his columns is not in place, and tried with SED and AWK, how I can correct format?
In the second line break is wrong, and puts it after the first column of next line
I would appreciate if you could guide me on the subject. (4 Replies)
Discussion started by: nitwh
4 Replies
8. Shell Programming and Scripting
I can not figure out this one, so I turn to unix.com for help, I have a file, in which there are some lines containing continuously duplicate columns, like the following
adb abc abc asd adfj
123 123 123 345
234 444 444 444 444 444 23
and the output I want is
adb abc asd adfj
123 345... (5 Replies)
Discussion started by: fedora
5 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to know if its possible to delete or ignore columns in a large dataset using 'sed'. For example, I have the following dataset: -
20060714,X.XX,1,043004,Q,T,24.0000,1,25.5000,4,
20060714,X.XX,1,081209,Q,T,24.0000,1,25.5000,5,
As you can see, there are 10 columns here and the... (4 Replies)
Discussion started by: aarif
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I've already posted elsewhere but am posting again here coz im a newbie. I hope you forgive me this time.
I want to know if its possible to delete or ignore columns in a large dataset using 'sed'. For example, I have the following dataset: -
... (0 Replies)
Discussion started by: aarif
0 Replies