Search Results

Search: Posts Made By: pparthji
10,419
Posted By pparthji
hi scritunizer, it wrks fine, but it...
hi scritunizer,

it wrks fine, but it generates file like 1.out, 2.out, and so on,
actually i ve to generate files /test1/filename1.out, /test2/filename2.out (there is no such specific format) n...
10,419
Posted By pparthji
No, its nt generating correct o/p: ...
No,

its nt generating correct o/p:

testDir> cat filesplit0.dat
|1|2|3|4|5|
|1|2|3|4|4|
|1|2|3|4|3|
/testDir> cat filesplit1.dat
|1|2|3|4|5|6|7|8|9|
|2|3|4|5|6|7|8|9|1|
|D|three|||||...
10,419
Posted By pparthji
hi, i am nt able to understand change...
hi,

i am nt able to understand
change specification; do
generate new awk
generate alternative new awk

can't we have done this thing in one awk without using loop?
10,419
Posted By pparthji
No, its nt spliting the file on the basis of...
No, its nt spliting the file on the basis of trailer record regular expression.
I need split like this:

filetoBeSplit.dat

|1|2|3|4|5|
|1|2|3|4|4|
|1|2|3|4|3|
|T|one||||...
10,419
Posted By pparthji
hi, its nt generating the files properly: ...
hi,

its nt generating the files properly:

/testDir (r245347@dbgvaapp1:/home/r245347/testDir)> cat filesplit0.dat
|1|2|3|4|5|
|1|2|3|4|4|
|1|2|3|4|3|
/testDir...
10,419
Posted By pparthji
Hi ahmed, i tried the following command for ...
Hi ahmed,
i tried the following command for

awk -F"|" -v n=0 '/^[TFZ]/{ close("filesplit"n".dat") ; n++ ; print > "filesplit"n".dat" ; next} { print >> "filesplit"n".dat"}' test1.dat
...
10,419
Posted By pparthji
Hi xoops, in your script, script is...
Hi xoops,

in your script, script is reading the file again and again which hampers the performance. and besides that, grep command returns the all the matched patterns, for eg,

|1|2|3|...
10,419
Posted By pparthji
hi pravin, i need the soluton in unix shell...
hi pravin,

i need the soluton in unix shell script.
10,419
Posted By pparthji
Split a file into multiple files
Hi,

i have a file like this:
1|2|3|4|5|
1|2|8|4|6|
Trailer1|||||
1|2|3|
Trailer2|||
3|4|5|6|
3|4|5|7|
3|4|5|8|
Trailer2|||
I want to generate 3 files out of this based on the trailer...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 04:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy