10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to add word in last of particular line.
the same command syntex is running on prompt. but in bash script give error."sed: -e expression #1, char 20: unterminated address regex"
Please help.
for i in `cat servername`;
do
ssh -q -t root@$i sed -i '/simple_allow_groups =/s/$/,... (4 Replies)
Discussion started by: yash_message
4 Replies
2. Shell Programming and Scripting
Hi,
# mailq | awk '{match($0, /quota/)} {print $0}' | head
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
9A6A7DE117E 84309 Sat Sep 30 14:14:50 alerts-noreply+xxxxx=xxx.sg@xxx.xx.xxx
(host alt1.gmail-smtp-in.l.google.com said: 452-4.2.2 The email account that you... (2 Replies)
Discussion started by: ashokvpp
2 Replies
3. Shell Programming and Scripting
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
4. Shell Programming and Scripting
I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine.
... (23 Replies)
Discussion started by: rbadveti
23 Replies
5. Shell Programming and Scripting
Hi
We have a tool to monitor logs in our environment. The tool accepts log pattern match only using regex and I accept I am a n00b in that:confused:. I had been banging my head to make it work without much success and at last had to turn on to my last option to post it here. I had got great... (2 Replies)
Discussion started by: radioactive9
2 Replies
6. Shell Programming and Scripting
Hello to all,
How would be the correct regex to match only the first occurence of
the pattern 3.*6.
I'm trying with 3.*6 trying to match only 34rrte56, but with my current regex is matching 4rrte567890123456789123powiluur56. And if I try with ?
doesn't print anything
echo... (6 Replies)
Discussion started by: Ophiuchus
6 Replies
7. Shell Programming and Scripting
Hi
Input:
MYTEXT.aa.bb
cc.MYTEXT.aa.bb
ee.dd.cc.MYTEXT.aa.bb
cc.NOTEXT.a.b
Output:
<empty>
cc
cc
<empty>
I would like to use a regex to extract the last word before MYTEXT without the dot (2 Replies)
Discussion started by: chitech
2 Replies
8. Shell Programming and Scripting
Hi Folks,
In my program, I have a variable which consists of multiple lines. i need to use each line as an input. My intention is to extract the email address of the user in each line and use it to process further.
The email address could be anywhere in the whole line. But there will be only... (5 Replies)
Discussion started by: ragz_82
5 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to use a sed command in a shell script in order to delete some lines in a file and I got the following error message.
I don't understand why it is not working 'cause I have tried with simple quotes, then with double-quotes, and it is not working.
sed: -e expression #1,... (7 Replies)
Discussion started by: Alpha3363
7 Replies
10. Shell Programming and Scripting
Hi
Can somebody please help me know how do i match the basename using a regular expression using posix standard in shell script
suppose i want to match
/u01/Sybase/data/master.dbf the result should be master.dbf as i want to match everything after the last /
regards (8 Replies)
Discussion started by: xiamin
8 Replies