Ok, this may be very simple but I can't find a solution. I have a list of numbered values which I have grepped from a larger life.
ex/
I need a quick way to organize them (using awk?) into 4 columns.
like this:
given this information:
^\w{3} {11} -]+ kernel:( \]+\.]+\])? ]+: media error \(bad sector\): status=0x]+ { DriveReady SeekComplete Error }$
^\w{3} {11} -]+ kernel:( \]+\.]+\])? end_request: I/O error, dev ]+, sector ]+
i need to set up monitoring for these strings. but as you can see, they... (2 Replies)
gawk 'BEGIN{count=0} /^Jan 5 04:33/,0 && /fail/ && /09x83377/ { count++ } END { print count }' /var/log/syslog
what is wrong with this code? i want to search the strings "fail" and "09x83377" from all entries. im grabbing all entries in the log starting from Jan 5 04:33 to the end of the... (3 Replies)
how do i "awk" the date after the from only to compare it on a if statement later .
filename example:
server1-ips-ultranoob-ok_From_2012_21_12-23:40:23_To_2012_21_12-23:49:45.zip
what i want o do is compare only the date from the string in "From_2012_21_12" in this case i only want the... (4 Replies)
Hi, could someone tell my why this doesn't work? egrep -c '\b\B+\b' file.txt What is the correct way to count all the words in a file?
Welcome to the UNIX and Linux Forums. Please use code tags. Video tutorial on how to use them (3 Replies)
I have an array with characters, what I want is if there are other characters in the array which I am looking for than take action that is print BAD ARRAY. So far my code just finds characters but instead I want that it should look for other characters.
echo "A B C D F" | egrep -o "D | F"
O/P... (5 Replies)
Dear Friends,
I have a command which can result following output.
Packet is: /var/adm/yyyy/pkt6043
Intended for network : /vob/repo
I would like to retrive
pkt6043 and /vob/repo using single command.
Blue color test will be always contstant and red color text will be dynamic
... (2 Replies)
Ok. I'm just starting to use AWK and I have a question. Here's what I'm trying to do:
uname -n returns the following on my box:
ftsdt-svsi20.si.sandbox.com
I want to pipe this to an AWK statement and make it only print:
svsi20
I tried:
uname -n | awk '{ FS = "." ; print $1 }'
... (5 Replies)
Hi,
The input file "notifications" contains the following string.
FRTP has 149 missing batches
I want to search for :
FRTP has missing batches
As the number 149 is not important and will change.
The commands I have tried.
grep "FRTP has.*missing batches" notifications.txt... (3 Replies)