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
The bash below loops through a specific directory dir and finds and writes the oldest folder to a variable called $filename.
#!/bin/bash
# oldest folder stored as variable for analysis, version log created, and quality indicators matched to run
dir=/home/cmccabe/Desktop/NGS/test
find... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
I stumbled upon a problem, which I simplified to this:
There is a list of numbers, stored in variable $LIST, lets use `seq 5 25` for demonstration.
There is a number that should be compared against this list. For demonstration I use user input - read VALUE
I am trying to compare RegEx... (2 Replies)
Discussion started by: Zorbeg
2 Replies
4. Shell Programming and Scripting
I have a file with the contents below "lets say the name of the file is abcxyz" shown at the end of this.
I am using nawk to find the exact ip address and the 6 lines after the match is found using the following nawk statement
/usr/bin/nawk "/111.46.14.107/,printed==6 { ++printed; print; }"... (7 Replies)
Discussion started by: knijjar
7 Replies
5. Shell Programming and Scripting
I have a scripting problem that I'm trying to solve, whereby I want to match that a string contains either of three strings. I'm thinking this is probably just me not understanding how to craft the appropriate regex. However, here's what I would like to do:
] && do-something
more... (10 Replies)
Discussion started by: forrie
10 Replies
6. Shell Programming and Scripting
Hi again,
I'm looking for some help with nawk, I can print a line which has a regex match in it from a file using /pattern/ but I'm looking for a way to only print the $tring which contains the pattern, rather than the whole line.
This $tring may be of variable length, may occur at any point... (1 Reply)
Discussion started by: spynappels
1 Replies
7. Shell Programming and Scripting
i am matching two files.
the files are in the format
file_1.txt
1|_|X|_|
2|_|W|_|
3|_|Y|_|
4|_|Z|_|
5|_|U|_|
file_2.txt
W|_|A|_|
Z|_|C|_|
V|_|B|_|
X|_|D|_|sdff|_|
Y|_|
file_3.txt should be in the format (4 Replies)
Discussion started by: centurion_13
4 Replies
8. Shell Programming and Scripting
I have a file tmp.txt as shown below:
Controller: 0
Disk: 0.0.0
Disk: 0.1.0
Disk: 0.2.0
Controller: 1
Volume:c1t2d0
Disk: 0.0.0
Disk: 0.1.0
Disk: 0.2.0
Controller: 2
Volume:c2t2d0
Disk: 0.2.0
Now I want to split... (4 Replies)
Discussion started by: durbam2002
4 Replies
9. Shell Programming and Scripting
i'm trying to use the "before" output from the match() function as part of the results of each Regex match... but...
My input data: (from an input file)
i only show the first record in my file.. all other records are similar.
mds_ar/bin/uedw92wp.ksh:cat $AI_SQL/wkly_inqry.sql... (2 Replies)
Discussion started by: danmauer
2 Replies
10. Shell Programming and Scripting
Is it possible to make the search in regular exprecion or in matching parts of sed, nawk and others to IGNORE the case of the search string?
I mean, like if used 'grep' with -i option:
> grep -i "abc" file
I would like to be able to do the same, say, by nawk:
> nawk '/abc/ {print $0}'... (4 Replies)
Discussion started by: alex_5161
4 Replies