10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I can't seem to get this right. I've tried it every way imaginable using every trick I see on stackexchange and such. No luck. So nothing major here, something like:
#!/bin/bash
SEARCH="ARG1 ARG2 '((^EXACT$)|(.*InTheMiddle*)|(^AtBeginning*))'"
java -cp /my/class/path MyClassName $SEARCH... (3 Replies)
Discussion started by: stonkers
3 Replies
2. 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
3. UNIX for Dummies Questions & Answers
I am trying to find files using the following by using simple bash script:
if -2014 ]]; then echo "yes";fi
What I need to find are any files with date 08-**-2014 so August 2014 any files.
I can use if -2014 ]]; then echo "yes";fi
That works fine. How do I get files beginning with 08... (1 Reply)
Discussion started by: newbie2010
1 Replies
4. Shell Programming and Scripting
I have a file that looks like this:
cat includes
CORP-CRASHTEST-BU
e:\crashplan\
CORP-TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
CORP-LABS_TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
What I want to do is make three new files with just those selections. So the three... (4 Replies)
Discussion started by: newbie2010
4 Replies
5. Shell Programming and Scripting
I am using a small script to divide some numbers in a given file and display the output in another file. I am getting the following error
basename: invalid option -- '5'
Try `basename --help' for more information.
(standard_in) 1: syntax error
The script is :
#!/bin/bash
for i in `cat... (4 Replies)
Discussion started by: kmnr877
4 Replies
6. UNIX for Dummies Questions & Answers
Hi, I am trying to match this word: hexagon-bx.mydomain.com with regex. I have tried this:
"\.*]*$"
So far I have not been successful. I also need to make sure that the regex will match words that just have lowercase letters and numbers in them, such as camera01. How can I create such an... (5 Replies)
Discussion started by: newbie2010
5 Replies
7. Shell Programming and Scripting
I've been using the following regex below in a bash script on RHEL 5.5 using version
GNU bash, version 3.2.25(1)-release
I've tried using the script on RHEL 6.3 which uses GNU bash, version 4.1.2(1)-release
I assume there's been alot of changes to bash since that's quite a jump in revisions.... (12 Replies)
Discussion started by: woodson2
12 Replies
8. Shell Programming and Scripting
Hey all,
I have a very simple regular expression that I use when I want to allow only letters with spaces. (I know this regex has a lot of shortcomings, but I'm still trying to learn them)
isAlpha='^*$'However, when I bring this over to BASH it doesn't allow me to enter spaces.
I use the... (3 Replies)
Discussion started by: whyte_rhyno
3 Replies
9. Shell Programming and Scripting
Hello everybody,
I'm clearly not an expert in bash scripting as I've written maybe less than 10 scripts in my life. I'm trying to strip an xml string removing every tag in it. I'm using bash substitution to do so, but apparently I missed something about what is a regex for bash ...
As an... (4 Replies)
Discussion started by: kerloi
4 Replies
10. Shell Programming and Scripting
hi i am using printf in a script and it is not printing negative values..i have to use printf to get rid of the newline..here is my code:
fin=`echo $a - $b | bc`
printf "${fin}," >> test
these statements are in a loop. here is what i get when i try to subtract 4 from 8:
./scr1: line... (2 Replies)
Discussion started by: npatwardhan
2 Replies