Search Results

Search: Posts Made By: kato
1,720
Posted By kato
If I understand you correctly, you want to...
If I understand you correctly, you want to specify the value to insert after DRIVES. Try this:

z="TEST"
grep -l '0007862454' ./* | xargs awk -v newDrive=$z '/DRIVES/{a=NR+1}...
1,720
Posted By kato
Try this from within the directory your files are...
Try this from within the directory your files are in:
grep -l '0007862454' ./* | xargs awk '/DRIVES/{a=NR+1} a==NR{$0=FILENAME}{print > FILENAME".new"}'
1,551
Posted By kato
Unless I misunderstand you, there is no problem...
Unless I misunderstand you, there is no problem with committing directory trees into source control systems. If you want a structure of /mod1/files then you should just create it on your local file...
4,512
Posted By kato
try this from within your folder with the links: ...
try this from within your folder with the links:
find . -type l | xargs ls -l | awk '{system("ln -sf " $11" "$9)}'

Although, you may want to test this first or it will mess up your links:
find ....
8,032
Posted By kato
I think your file must have some control...
I think your file must have some control characters in it that are not visible and also not copied into your example text.
That would explain why the code works when I use it on the examples given....
4,472
Posted By kato
No problem. It is better to make the code more...
No problem. It is better to make the code more readable:

awk '
/UDP flood/{ --> match lines with UDP flood
flood=$0; --> copy it for later
if(line){ ...
3,920
Posted By kato
awk -F, '{a[$1]++} END{for(row in a)...
awk -F, '{a[$1]++} END{for(row in a) if(a[row]==1) print row}' file*
1,528
Posted By kato
A bit messy, but: awk -F, 'NR==1{print...
A bit messy, but:

awk -F, 'NR==1{print $1",OUT1,OUT2,OUT3";next}{b=substr($0,length($1)); print $1","gsub(/[12]/,"",b)","gsub(/[34]/,"",b)","gsub(/[56]/,"",b)}' file
2,606
Posted By kato
path2=$(echo "$path" | sed -e...
path2=$(echo "$path" | sed -e 's/\//\\\//g')
8,413
Posted By kato
sed -i 's/triumph and disaster must be treated...
sed -i 's/triumph and disaster must be treated same./follow excellence success will chase you./' file1
Showing results 1 to 10 of 10

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