Search Results

Search: Posts Made By: Ikon
2,234
Posted By Franklin52
Can you post the output of: head -2 your_file |...
Can you post the output of:
head -2 your_file | od -An -t a

Please use code tags!
1,629
Posted By Franklin52
You can do something like this with awk: ...
You can do something like this with awk:
your_application |
awk '
/pattern1/{print > "file_with_pattern1"}
/pattern2/{print > "file_with_pattern2"}
' > file_with_other_lines
6,652
Posted By Franklin52
Sorry, I misunderstood the question, try this: ...
Sorry, I misunderstood the question, try this:
awk '(!/sshd/ && !/ftpd/) && (/fail/ || /error/){print; f=1;}
/above message repeats/ && f{print;f=0}' syslog.log
6,652
Posted By Franklin52
Something like this? awk '(!/sshd/ && !/ftpd/)...
Something like this?
awk '(!/sshd/ && !/ftpd/) && /fail/ || /error/{print; f=1; getline}
/above message repeats/ && f
{f=0}' syslog.log
Showing results 1 to 4 of 4

 

Featured Tech Videos

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