Search Results

Search: Posts Made By: SankalpS
1,556
Posted By rangarasan
grep
Hi,
Try this,

grep 'pattern' path/file
awk '/pattern/{t=1;print;}END{if(t!=1){print "pattern not found";}}' path/file

Cheers,
Ranga:-)
2,005
Posted By joeyg
Yes, try the command to see what happens. If it...
Yes, try the command to see what happens.
If it works, great.
If not, then will need to see what might be wrong; including mail not running on your unix box.
2,005
Posted By joeyg
Couple things to consider
cd /var/logs/abc.log
will error. should
cd /var/logs
as you change directories, and should not include filename

Now, since a cd command could error, probably better to change you 2nd line to
...
2,005
Posted By joeyg
Think about this as two steps
1. Create a unix script to email you the file. Perhaps something using mailx command.
see --> https://www.unix.com/solaris/75582-mail-attachments.html
2. Then, create a cron entry to execute the...
Showing results 1 to 4 of 4

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