Search Results

Search: Posts Made By: Akshay Hegde
1,501
Posted By Akshay Hegde
Try this script [akshay@nio tmp]$ cat...
Try this script

[akshay@nio tmp]$ cat split_data.awk
BEGIN{
if( ARGC < 2 || !h )
{

getline t < "/proc/self/cmdline";
split(t,T,"\0")
error=1
print "\n\tUsage ...
1,501
Posted By Akshay Hegde
I didn't understand , please show expected output...
I didn't understand , please show expected output using codetags.

---------- Post updated at 03:28 PM ---------- Previous update was at 03:17 PM ----------

I got output like this when h=2
...
1,501
Posted By Akshay Hegde
Try awk '/AD/{if(++f>h)f=1;...
Try

awk '/AD/{if(++f>h)f=1; if(f==1){close(file);file=sprintf("Output_%04d.txt",++s) }}{print >file}' h='2' file

change variable h highlighted
Showing results 1 to 3 of 3

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