10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to add a tab after the last digit in $3 in the input. The grep below is all I can think off. Thank you :)
sed -n 's/:/&/p' input
input
chr1 955542 955763AGRN-6|gc=75
chr1 957570 957852AGRN-7|gc=61.2
chr1 976034 976270AGRN-9|gc=74.5
desired output
chr1... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. UNIX for Dummies Questions & Answers
Here's a sample of the data:
NAME BIRTHDAY SEX LOCATION AGE ID
Jim 05/11/1986 M Japan 27 86
Rei 08/25/1990 F Korea 24 33
Jane 02/24/1985 F India 29 78
I've been trying to sort files using the... (8 Replies)
Discussion started by: maihani
8 Replies
3. Shell Programming and Scripting
Hello, I need to replace newline with tab at certain lines of the file (every four lines is a record).
infile.fq:
@GAIIX-300
ATAGTCAAAT
+
_SZS^\\\cd
@GAIIX-300
CATACGACAT
+
hhghfdffhh
@GAIIX-300
GACGACGTAT
+
gggfcfoutfile:
@GAIIX-300 ATAGTCAAAT + _SZS^\\\cd
@GAIIX-300 ... (6 Replies)
Discussion started by: yifangt
6 Replies
4. Windows & DOS: Issues & Discussions
forum members,
gvim version 6.0.150.0
Vi has been my favorite editor for over 30 years. Mostly with
Unix but now with windows XP. It works fine but I want to
change the tab to 4 spaces instead of 8. I read on the internet
that I can edit the .vimrc file but I only have an _vimrc... (12 Replies)
Discussion started by: jerryd
12 Replies
5. UNIX for Dummies Questions & Answers
Hi !
input:
111|222|333|aaa|bbb|ccc
999|888|777|nnn|kkk
444|666|555|eee|ttt|ooo|ppp
With awk, I am trying to change the FS "|" to "; " only from the 4th field until the end (the number of fields vary between records).
In order to get:
111|222|333|aaa; bbb; ccc
999|888|777|nnn; kkk... (1 Reply)
Discussion started by: beca123456
1 Replies
6. UNIX for Dummies Questions & Answers
Hello Gurus,
I have a text file containing nearly 12,000 tab delimited characters with 4000 rows. If the file size is small, excel can convert the text into coloumns. However, the file that I have is very big. Can some body help me in solving this problem?
The input file example,
... (6 Replies)
Discussion started by: Unilearn
6 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have about 100 files in a directory with fields which are tab delimited. I would like to append the file name as the first field and it has to be done as many times as the total lines in the file.
For example,
myFile1.txt has the following data:
1 x y z
2 a b ... (5 Replies)
Discussion started by: Gussifinknottle
5 Replies
8. Shell Programming and Scripting
Hello,
Can someone help me to do this with awk or sed? I have a file with multiple lines, each line has many fields separated with a tab. I would like to add one more field holding 'na' in between the first and second fields.
old file looks like,
1, field1 field2 field3 ...
2, field1... (7 Replies)
Discussion started by: ssshen
7 Replies
9. Shell Programming and Scripting
I have files with tabs separating the fields but those fields values can have whitespace characters (basically a text string). I want to instruct join to not consider white spaces as separators but only tabs.
I have tried:
join -t "<Tab>" file1 file2
join -t "<tab>" file1 file2
join -t "\t"... (7 Replies)
Discussion started by: FrancoisCN
7 Replies
10. UNIX for Dummies Questions & Answers
I'm trying to use sort on a file with tab-delimited fields. I can't figure out how to tell sort to use the tab character as the field separator. I'm trying this on both an HP Unix system and on OS X (using bash on both).
Things I've tried:
sort -t\t
sort -t"\t"
sort -t\"\t\"
I've tried... (8 Replies)
Discussion started by: SSteve
8 Replies