Search Results

Search: Posts Made By: manish8484
1,556
Posted By balajesuri
basename India.txt .txt
basename India.txt .txt
2,741
Posted By CarloM
Well, what you actually seem to want is the rest...
Well, what you actually seem to want is the rest of that field, not the next 10 characters.

Similar to ahamed101's earlier suggestion:
a=gsub("FILEHEADER","",$1)
2,741
Posted By CarloM
If you don't want the 'ABC' included in the...
If you don't want the 'ABC' included in the filenames then you'll need to use $1 rather than $0 (and removing the spaces won't be necessary). Using gsub rather than substr to extract the filename is...
2,741
Posted By Skrynesaver
This works for me perl -e 'while(<>){my...
This works for me


perl -e 'while(<>){my @records; if (/^HEADER(.+$)/){open FILE, ">", "$1.txt";print FILE $_;while(<>){print FILE $_; last if /^eof$/;}}}' tmp/test.dat
Showing results 1 to 4 of 4

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