Hi
I have below script which is used to grep specific errors and if error string matches send an email alert.
Script is working fine , however , i wish to print next 10 lines of the string match to get the details of error in the email alert
Current code:-
#!/bin/bash
tail -Fn0 --retry... (2 Replies)
Hi folks,
I am trying to open directory and then print the files in that directory in PERL.
I have used the below code.
opendir(DIR,$destination) or die ("Cannot open directory $destination");
my @bwfiles = readdir(DIR);
print @bwfiles;
I am able to retrieve all the files the files... (2 Replies)
I've seen dozens of similar threads but none seem to match what I'm looking for and I can't seem to make sense of how to do this so any help would be immensely appreciated.
I am running a command that generates this output:
Mike Smith
Mike Smith Alaska
Mike Smith Washington
Mike Smith Alaska... (6 Replies)
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1
CAR2_KEY0
CAR2_KEY1
CAR1_KEY10
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
To give you some context of my issue the following is some sample dummy data. The field delimiter is "<-->". The 4th field is going to be tags for my notes. The tags should always be unique and sorted alphabetically.
1<-->01/20/12<-->01/20/12<-->1st note<-->1st note<-NL->2 lines... (4 Replies)
I’m trying to modify someone perl script to fix a bug. The piece of code checks that the zone name you want to add is unique. However, when the code runs, it finds a partial match using grep, and decides it already exists, so the “create” command exits.
$cstatus = `${ZADM} list -vic | grep... (3 Replies)
Hello,
I looking to use grep to return a string with exactly n matches.
I'm building off this:
ls -aLl /bin | grep '^.\{9\}x' | tr -s ' '
-rwxr-xr-x 1 root root 632816 Nov 25 2008 vi
-rwxr-xr-x 1 root root 632816 Nov 25 2008 view
-rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)