Search Results

Search: Posts Made By: R.T.
3,637
Posted By R.T.
ksh93 if statement gives "not found" error
Why do I get the error on the second example?.

This works:
if [[ "a" = "a" ]];then
> echo "true"
> else
> echo "false"
> fi
true
This doesn't, and gets the error shown:
if [[ "a" = "a"...
7,677
Posted By R.T.
I think profile variables need to be exported and...
I think profile variables need to be exported and are not getting to your script. Can you do an echo "Output=$OUTPUT" inside your script to check?
18,073
Posted By R.T.
Things inside brackets are a "test". -z tests...
Things inside brackets are a "test". -z tests "$name" to see if its length is zero.

from "man test":
-z String1
Returns a True exit value if the length of the String1...
3,415
Posted By R.T.
if [ $a = $b ]; then echo "variables are equal";...
if [ $a = $b ]; then echo "variables are equal"; fi
Worked for me.
20,724
Posted By R.T.
Go here and look in the sample chapter for...
Go here and look in the sample chapter for diffdate. (Hi Chris)
[url="http://members.torfree.net/chris/books/cfaj/ssr.html"]
5,740
Posted By R.T.
awk '{print "blah bli" $0 "blu"}' readfile.txt >...
awk '{print "blah bli" $0 "blu"}' readfile.txt > outfile.txt
This is how I would do it.
Forum: Solaris 04-07-2009
2,345
Posted By R.T.
You could change your print... to: print...
You could change your print... to:
print substr($9,index($9,".")+1)
2,271
Posted By R.T.
That answers it. Thank you very much!
That answers it. Thank you very much!
2,901
Posted By R.T.
awk '{A=$1;B=$2;C=C+A*B;print A" x "B" =...
awk '{A=$1;B=$2;C=C+A*B;print A" x "B" = "A*B};END{print "Total = "C}' filename
2,901
Posted By R.T.
awk '{A=$1;B=$2;print A" x "B" = "A*B}'...
awk '{A=$1;B=$2;print A" x "B" = "A*B}' filename
2,271
Posted By R.T.
But not in cygwin or aix.
But not in cygwin or aix.
2,901
Posted By R.T.
Are you familiar with awk? You could try awk...
Are you familiar with awk?
You could try
awk '{print $1" x "$2" = "$1*$2}' filename
$1 would be the first field, $2 would be the second, etc.
2,271
Posted By R.T.
Where does the 8 come from? (or what happend to the first `)
$ ksh
$ echo "\047"0"\047"
result:
8'
Forum: AIX 03-10-2009
4,564
Posted By R.T.
for f in `cat listoffiles` do grep "specific...
for f in `cat listoffiles`
do
grep "specific pattern" "$f"
done

depending on what you want from the grep, you might want a "grep -l..."
11,951
Posted By R.T.
You are very close! Try putting "lines", "chars"...
You are very close! Try putting "lines", "chars" and "words" in quotes.
Showing results 1 to 15 of 15

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