Search Results

Search: Posts Made By: r3d3
3,975
Posted By Don Cragun
The awk script provided by ChublerXL should work...
The awk script provided by ChublerXL should work well as long as huge_file.txt contains a small number of different departments. The number of open files allowed varies with different...
3,975
Posted By Chubler_XL
Here is a solution in awk: awk 'F{F=F "\n"...
Here is a solution in awk:

awk 'F{F=F "\n" $0}
/start regexp/ {F=$0}
/end regexp/ {
$0=F "\n"
if(gsub(/.*Department=/, "", F)) gsub(/\n.*/, ".txt", F)
else F="Unknown.txt"
print > F...
Showing results 1 to 2 of 2

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