Search Results

Search: Posts Made By: saratha14
2,463
Posted By Corona688
It doesn't, it just does what it's told -- print...
It doesn't, it just does what it's told -- print each line into filename.

And since filename is calculated from the line number each line, the file name changes depending on the equation we just...
2,463
Posted By RudiC
Try yourself. Run:awk 'BEGIN {for (i=1; i<=69;...
Try yourself. Run:awk 'BEGIN {for (i=1; i<=69; i++) print i, "filename" int((i-1)/34)".DAT"}'
2,593
Posted By pravin27
if column 3 value is constant, use below code ...
if column 3 value is constant, use below code

awk '{newnum=sprintf ("%07.f", NR);sub("0000001",newnum,$0)}1' filename
2,593
Posted By RudiC
Please use code tags, not icode tags. Try...
Please use code tags, not icode tags.

Try awk '{$3=sprintf ("%07.f", NR)}1' file
ASDSD ADSD 0000001 X
AAASD ADSD 0000002 X
SDDDD ADSD 0000003 X
1,971
Posted By junior-helper
Hi mate, I guess you mean *line* length? If the...
Hi mate,
I guess you mean *line* length? If the file has only one long line, you could try this:
yes "`<input.dat`" | head
If it works for you, then run this:
yes "`<input.dat`" | head -n 1000000...
1,971
Posted By Makarand Dodmis
tryvar="100234 XHYSDDS SDSD" nawk -v var="$var"...
tryvar="100234 XHYSDDS SDSD"
nawk -v var="$var" 'BEGIN { for ( i = 1; i <=1000000; i++ ) { print var}}'
94,847
Posted By Neo
User Guide: Posting in the Emergency Forum
Emergency UNIX and Linux Support !! Help Me! Forum (Request Urgent Help) (https://www.unix.com/emergency-unix-linux-support-help-me/)

README FIRST: How to Request Emergency or Urgent Help:


...
Showing results 1 to 7 of 7

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