Search Results

Search: Posts Made By: sudhish
4,338
Posted By sudhish
Problem to search multiple strings
Hi all,
I am search a string from a file using following command, I want to pick the message ( I.e print $5) from the lookup file if and only if both $hostname and $instancename match....
2,920
Posted By sudhish
Thanks a lot, both this code are working fine. ...
Thanks a lot, both this code are working fine.

egrep "($1|$2)"
grep -e "string1\|string2"



Thanks
Regards
Sudhish S. kumar
2,920
Posted By sudhish
grep -e "(string1|string2)" /filename This...
grep -e "(string1|string2)" /filename

This command is not working

In fact I was looking for some thing like you suggested

Thanks
Regards
Sudhish S. Kumar
2,920
Posted By sudhish
How can I simplify the script
Hi all,

How can I simplify following script,
Logic is to find two strings (strings are case sensitive) from a file.

if [ `grep -x "$1" "$path"/Hostname/$file_name|wc -l` -eq 1 ]; then
if...
3,520
Posted By sudhish
Hi, Sorry for the delay response. This...
Hi,

Sorry for the delay response.

This is what the scripts does.

My main script doesn't read the file cash.log, it only append SMS message to cash.log (messages format are given below).
...
3,520
Posted By sudhish
It is not working;
Hi,

It is not working; I can't rename the file (cash.log) because another script output always feed SMS messages into it

Thanks in advance
Regards
Sudhish
3,520
Posted By sudhish
Deletion of first line is the problem
Hi,

Let me explain my requirement

1. $path/cash.log is a cash file, I can't rename it because it content is loaded by another script
2. This script will send SMS until cash.log file become...
3,520
Posted By sudhish
Deletion of first line is the problem
Hi,
Let me explain my requirement
1. $path/cash.log is a cash file, I can't rename it because it content is loaded by another script
2. This script will send SMS until cash.log file become empty...
3,520
Posted By sudhish
but I what to delete the first line
Hi,

awk ' NR > 1 { print > "newfile.back" }' currentfile

It is working fine, but I what to delete the first line since it is loop command I cant replace the file.
Thanks in advance

Regards...
3,520
Posted By sudhish
How I can replace this command --need help
Hi,

can I delate first line in a file without opening a file.

Normal unix "sed -i '1d' $path/cash.log" command is working fine, but my windows application not supporting latest version of sed,...
Showing results 1 to 10 of 10

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