Search Results

Search: Posts Made By: DrRo183
1,901
Posted By DrRo183
Perl regular expressions...
I am writing script that will act like the 'comm' utility. My
problem is when trying to read whether the user has entered -123 or -1
or -1...etc.

I currently have:


...
2,791
Posted By DrRo183
Got it. addNumber(){ echo "Phone...
Got it.

addNumber(){
echo "Phone number: \c";
read number;
echo $number;
if [ -z "$number" ] ; then # <==== should be double quoted...
...
2,791
Posted By DrRo183
Handling null input...
Ok, so when a user inputs nothing, simply pressing enter when prompted for a phone number, I get a "./addrbkfct.sh: test: argument expected" error message. I have the following function:
...
3,382
Posted By DrRo183
Thanks. Also, would I be able to do assign...
Thanks.

Also, would I be able to do assign to a variable the ouput value of the following:

fgrep "matchString" anyfile.dat | wc -l

right now what I have is:

grep "^$1:" myfile.dat;
echo...
7,734
Posted By DrRo183
"http://www.cs.may.ie/~foo~dtray/cs211/lecture1.ht...
"http://www.cs.may.ie/~foo~dtray/cs211/lecture1.htm" <==what?

Ok, I give up. How to differentiate whether you want the first tilde, or the nth.
3,430
Posted By DrRo183
Oops, my way would make the following acceptable:...
Oops, my way would make the following acceptable:

"a furious bulldog"

so Ygor's got it.
7,734
Posted By DrRo183
well...what are the rules/conditions? Will every...
well...what are the rules/conditions? Will every url be complete as submitted above?
7,734
Posted By DrRo183
I would grep lines containing the keywords, and...
I would grep lines containing the keywords, and pipe to a cut.
3,430
Posted By DrRo183
I would do: grep ".*dog.*" temp
I would do:

grep ".*dog.*" temp
3,382
Posted By DrRo183
recording lines returned from fgrep...
Ok, I'm too used to c/java. I want to go through a file to search for lines matching a given string using:

fgrep "matchString" anyfile.dat;

This works like it should, but I would like to record...
Showing results 1 to 10 of 10

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