Search Results

Search: Posts Made By: santosh2k2
2,731
Posted By elixir_sinari
awk '/<\?xml version="1\.0"...
awk '/<\?xml version="1\.0" encoding="utf-8"\?>/{n++}
n{f="XML_DUMP" sprintf("%04d",n) ".txt"
print >> f
close(f)}' XML_DUMP.txt
2,731
Posted By pamu
try awk '/xml...
try

awk '/xml version="1.0"/{x="'"${SrcFileName}_"'" sprintf("%04d",++i) ".txt";}
{print > x}' $SrcFileName.txt
7,938
Posted By pamu
SrcFileName=$1 SplitCount=$2 awk -v...
SrcFileName=$1
SplitCount=$2


awk -v CN="$SplitCount" -v File_name="$SrcFileName" '{a++;if($0 ~ /^101/){if(s){
if(a>=CN){a=0;x++;fn=File_name""x;print s > fn;s=$0}else{print s > fn;s=$0}}...
7,938
Posted By pamu
awk -v CN="$SplitCount" -v...
awk -v CN="$SplitCount" -v File_name="$SrcFileName" '{a++;if($0 ~ /^101/){if(s){
if(a>=CN){a=0;x++;fn=File_name"_"sprintf("%04d",x)".txt";print s > fn;s=$0}else{print s > fn;s=$0}}...
7,938
Posted By elixir_sinari
Hint (or is it not? :)): awk 'NR%10 == 1{f="x_"...
Hint (or is it not? :)):
awk 'NR%10 == 1{f="x_" sprintf("%03d",++i)}{print > f}' file
Showing results 1 to 5 of 5

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