10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to run the awk below. My question is when I split the input, then run anotherawk to perform a calculation using that splitas the input there are no issues. When I try to combine them the output is not correct, is the split not working or did I do it wrong? Thank you :).
input
... (8 Replies)
Discussion started by: cmccabe
8 Replies
2. Shell Programming and Scripting
Hello,
I have the following input file:
A=1;B=2;C=3;D=4
A=4;B=6;C=7;D=9
I wish to have the following output
1 2 3 4
4 6 7 9
Can awk split be used to do this?
I have done this without using split, but the process is quite tedious.
Any help is appreciated! (4 Replies)
Discussion started by: Rabu
4 Replies
3. Shell Programming and Scripting
How to split the file and have suffix with formatted numbers
Tried the following code
awk '{filename="split."int((NR-1)/2)".txt"; print >> filename}' split.txt
Current Result
Expected Result (21 Replies)
Discussion started by: bobbygsk
21 Replies
4. Shell Programming and Scripting
Hi All
I have one query,say i have a requirement like the below code should be
move to diffent files whose maximum lines can be of 10 lines.Say in the below example,it consist of 14 lines.
This should be moved logically using the data in the fisrt coloumn to file1 and file 2.The data of first... (2 Replies)
Discussion started by: sarav.shan
2 Replies
5. Shell Programming and Scripting
Hello;
I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies
6. UNIX for Dummies Questions & Answers
Hi Folks,
I have lines that look like this:
>m110730_101608_00120_c100168052554400000315046108261127_s1_p0/7/29_426ACGTGCTATGCGG
>m110730_101608_00120_c100168052554400000315046108261127_s1_p0/7/469_894ACGTGCTATGCGG
I want to split all lines into:
... (4 Replies)
Discussion started by: heecha
4 Replies
7. UNIX for Dummies Questions & Answers
Can anybody tell me what is wrong with this ? It does not produce anyoutput.
awk 'split( "this:that", arr,":")' (2 Replies)
Discussion started by: jville
2 Replies
8. UNIX for Dummies Questions & Answers
Hello,
Hello,
I use the following command to split a file:
split -Number_of_Lines Input_File MyPrefix_
output is
MyPrefix_a
MyPrefix_b
MyPrefix_c
......
Instead, how can I get numerical values like:
MyPrefix_1
MyPrefix_2
MyPrefix_3
...... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
9. Shell Programming and Scripting
Dear colleagues! I want to create a script which will take each file from the list and then parse it filename with awk/split. I do it this way:
for file in `cat /$FileListFN`; do
echo `awk '
{N=split(FILENAME,FNParts,"_")}
{for (i=1; i<=N; i++)
... (10 Replies)
Discussion started by: slarionoff
10 Replies
10. UNIX for Dummies Questions & Answers
I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this.
For example:
split -l 3000000 filename.txt
This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies