10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi
$ awk '{print $1," ",$4}' access.log | sort | uniq -c| sort -nr | head -n20
62 192.168.10.6
How can get the result like
62, 192.168.10.6, 14:40
62, 192.168.10.32, 47:57
I tried modifying -
$ awk '{print $1," ",$4}' access.log | sort | uniq -c| sort -nr | head -n20 | awk... (3 Replies)
Discussion started by: ashokvpp
3 Replies
3. Shell Programming and Scripting
I am having trouble with regex capturing groups, For Ex :
I am having a file with
ABC CDLF SFSDFK PRIMARY INDEX(XYZ,DEF,GHI);
XYZ FLJ SDFKLD; PRIMARY INDEX(ABC);
BHI SDKFLFLSFD PRIMARY INDEX (QWE , RTY , LHJ);
My output should be :
ABC XYZ,DEF,GHI
XYZ ABC
BHI ... (10 Replies)
Discussion started by: ysvsr1
10 Replies
4. Shell Programming and Scripting
I am writing the code in perl.
I have an array in perl and each variable in the array contains the data in the below format
Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Discussion started by: giridhar276
5 Replies
5. UNIX for Dummies Questions & Answers
I need to write a regular expression for todays date in format 12/11/11? any help will be greatful thanks. (3 Replies)
Discussion started by: drew211
3 Replies
6. Shell Programming and Scripting
Hi all
I am struggling to find out the capturing regex of a date format such as 10/12/2009. Also I need help on how to assign the date(i.e, 10/12/2009 ) to a variable after the match is found using the capturing regex.
Any help is appreciated. Thanks in advance. (5 Replies)
Discussion started by: my_Perl
5 Replies
7. UNIX for Dummies Questions & Answers
First of all want to apologize for such a simple question. Very "new" to UNIX and have just taken a small intro class.
I need to pull back YYYYMMDD and store it in a field to be used later. I figured out date "+%Y%m%d" returns the date in that format, just not sure how to store it.
I am... (7 Replies)
Discussion started by: cards0622
7 Replies
8. Shell Programming and Scripting
hi
this is an example of code:
use strict;
use warnings;
open FILE, "/tmp/result_2";
my $regex="\\ Starting program ver. (.*)";
my $res="Program started, version <$1> - OK.\n";
while (<FILE>) {
if ($_ =~ /($regex)/) {
print "$res";
}
}
close FILE;
This finds $regex and print... (3 Replies)
Discussion started by: xist
3 Replies
9. Programming
hi all:
i want to store the current date in to a file from a program.
every time i execute the prg the date should get appended into the file.
help me plz (2 Replies)
Discussion started by: bankpro
2 Replies
10. Shell Programming and Scripting
Hi All,
Hope you can help me out here...This is what I'm doing:
% date '+%y.%m.%d'
05.03.05
How can I tweak this so that it gives me the PREVIOUS date, more specifically:
05.03.04
Hope you all can help.
Thanks!!!
Vince (3 Replies)
Discussion started by: tomeldan
3 Replies