10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear all,
I want to extract around 300 columns from a very large file with almost 2million columns. There are no headers, but I can find out which column numbers I want. I know I can extract with the function 'cut -f2' for example just the second column but how do I do this for such a large... (1 Reply)
Discussion started by: fndijk
1 Replies
2. UNIX for Dummies Questions & Answers
Hi all. Wondering if someone can help with an awk solution to a problem I'm stumped with.
I have a matrix file with >1000 fields and would like to add another column after each column with a text label. For example:
Input:
$cat file.txt
name col1 col2 col3 coln
aaaa ... (2 Replies)
Discussion started by: torchij
2 Replies
3. Shell Programming and Scripting
Hi
I have this file with content
ale,4 ,ale,2 ,ale,1 ,ale,2
ale,1 ,ale,7 ,ale,7 ,ale,13
ale,6 ,ale,1 ,ale,1 ,ale,1
ale,1 ,ale,1 ,ale,37 ,ale,1
ale,1 ,ale,1 ,ale,2 ,ale,37
ale,77 ,ale,1 ,ale,53 ,ale,3
ale,5 ,ale,1 ,ale,2 ,ale,40
ale,1 ,ale,1 ,ale,44 ,ale,1... (7 Replies)
Discussion started by: nikhil jain
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a data file that contains 61 columns. I want to delete all the columns except columns, 3,6 and 8. The columns are tab de-limited. How would I achieve this on the terminal?
Thanks (2 Replies)
Discussion started by: lost.identity
2 Replies
5. Shell Programming and Scripting
Hi,
I'm having a problem printing two consecutive columns, as I iterate through a large matrix by twenty columns and I was looking for a solution.
My input file looks something like this
1 id1 A1 A2 A3 A4 A5 A6....A20 A21 A22 A23....A4001 A4002
2 id2 B1 B2 B3 B4 B5 B6...
3 id3 ...
4 id4... (8 Replies)
Discussion started by: flotsam
8 Replies
6. Shell Programming and Scripting
I have done a couple of searches on this and have found many threads but I don't think I've found one that is useful to me - probably because I have very basic comprehension of perl and beginners shell so trying to manipulate a script already posted maybe beyond my capabilities....
Anyway - I... (26 Replies)
Discussion started by: Myrona
26 Replies
7. Shell Programming and Scripting
I have a large flat file with variable length fields that are pipe delimited. The file has no new line or CR/LF characters to indicate a new record. I need to parse the file and after some number of fields, I need to insert a CR/LF to start the next record.
Input file ... (2 Replies)
Discussion started by: clintrpeterson
2 Replies
8. Shell Programming and Scripting
Hope somebody is happy.
NR==1 {
num_columns=split( $0, menuend );
next;
}
{
split( $0, substrend );
for ( i=1; i<=NF; i++ ) {
minuend -= substrend;
}
}
END {
print "Result:";
for ( i=1; i<=num_columns; i++ ) {
printf(... (3 Replies)
Discussion started by: awkward
3 Replies
9. Shell Programming and Scripting
I have one large file, after every 200 line i have to split the file and the add header and footer to each small file?
It is possible to add different header and footer to each file? (7 Replies)
Discussion started by: ashish4422
7 Replies
10. Shell Programming and Scripting
I have one large file, after every 200 line i have to split the file and the add header and footer to each small file?
It is possible to add different header and footer to each file? (1 Reply)
Discussion started by: ashish4422
1 Replies