Unix/Linux Go Back    

Showing results 1 to 7 of 7
Search took 0.01 seconds.
Search: Posts Made By: sameeribraimo
Forum: Windows & DOS: Issues & Discussions Linux 07-12-2012
Replies: 1
Views: 1,298
Posted By sameeribraimo
Columns to Rows

I want to create a script with gawk.

I have the following file with 2 columns:


A 1
A 2
A 3
B 1
B 2
Forum: Windows & DOS: Issues & Discussions Linux 05-16-2012
Replies: 13
Views: 3,372
Posted By sameeribraimo
I'm working on windows so i change: NR==1{ ...

I'm working on windows so i change:

NR==1{
print;nf=NF;next
}
FNR==1{next}
nf!=NF{
system("del -f outfile"); exit
}1
Forum: Windows & DOS: Issues & Discussions Linux 05-16-2012
Replies: 13
Views: 3,372
Posted By sameeribraimo
Thanks in advance. If the files have the...

Thanks in advance.

If the files have the same number of columns it works fine.
But if any file does not have the same number of columns gives error

i have error:
'0 Is not recognized as an...
Forum: Windows & DOS: Issues & Discussions Linux 05-16-2012
Replies: 13
Views: 3,372
Posted By sameeribraimo
I believe that I did not explained well. ...

I believe that I did not explained well.

What I want is the following:

file1.txt:
a b c
1 1 1
2 2 2
3 3 3
4 4 4
Forum: Windows & DOS: Issues & Discussions Linux 05-16-2012
Replies: 13
Views: 3,372
Posted By sameeribraimo
can send me please the code integrated that...

can send me please the code integrated that before processing all files validate the headers - number of columns is equal in all.

Only creates or process the new merged file if the number of...
Forum: Windows & DOS: Issues & Discussions Linux 05-16-2012
Replies: 13
Views: 3,372
Posted By sameeribraimo
Thanks But can I validate that the number of...

Thanks

But can I validate that the number of columns of each file is the same?
Forum: Windows & DOS: Issues & Discussions Linux 05-16-2012
Replies: 13
Views: 3,372
Posted By sameeribraimo
gawk: Merge N files into one

hi all!

i'm an awk newbie and have been trying in vain to merge N files together.

ie.

file1.txt:
a b c
1 1 1
2 2 2
Showing results 1 to 7 of 7

 


All times are GMT -4. The time now is 08:19 PM.