Search Results

Search: Posts Made By: Ccccc
2,830
Posted By Ccccc
Thanks Frans. Thanks Franklin52. This was...
Thanks Frans. Thanks Franklin52.
This was really a baptism in "unary operator expected" and "integer expression expected". Finally the light came on AND it was not a train at the end of the tunnel....
2,830
Posted By Ccccc
Where to Begin comparing numbers?
Thanks Frans.
That worked just great, but my old nemesis is here: unary operator expected.
Line 14: [: -eq: unary operator expected ]
Thanks so much for your help. :-)
Ccccc
2,830
Posted By Ccccc
Need help with error message.
Hi.
I've tried to figure out this error message but no luck. This code was sent in by Frans.
When I enter the Sales Price I get this msg:
"./ss: line 11: 2: command not found"
Transactions :...
2,830
Posted By Ccccc
Where to Begin Comparing Numbers?
Thank you Malcomex999 (smile) and Frans.
But I don't see how to find the Max or Min in your examples. Did I miss something? :confused:
Many, many thanks.
Ccccc
2,830
Posted By Ccccc
Where to being Comparing numbers?
Hi. I do not know how to compare numbers and need help. In my script I have to figure the MAX, MIN, & Avg. Sales amounts.
Please help me.
In the code, "transaction" is a counter.

#!/bin/bash...
15,843
Posted By Ccccc
Format Money/Currency (U.S.)
I have looked everywhere.
Does bash have a money/currency format for output?

Do I have to use awk or printf?
Thank you
6,599
Posted By Ccccc
Many, many Thanks to all of you.
Many, many Thanks to all of you.
10,267
Posted By Ccccc
Recursion err (continued)
Thank you fp and Jim McNamara.

Jim, why are there two instances of::confused:

echo "enter sales price"
read sales
. . .
while. . .
echo "enter sales price \c"
read sales

Again thanks...
10,267
Posted By Ccccc
Expression recursion level question
Hi. I am receiving this error message for the highlighted line (let "total=$total+$sales").
line 11: let: total+sales:expression recursion level exceeded (error token is "total+sales")

counter=0...
4,050
Posted By Ccccc
I tried this, with no luck. let...
I tried this, with no luck.
let counter=$counter+1
let total=$total+$sales
4,050
Posted By Ccccc
Running total running wild
Thank you that did it.

Now my next problem. I enter a number, but the script is not totaling. It just outputs the number that I entered.

What did I leave out?
TIA
4,050
Posted By Ccccc
Running Total Running Wild
Hi. A shell scripting newbie here. I am trying to write a script that will create a running total of Sales, and increment a counter for each Sales entry, but when I executed the program it never...
1,592
Posted By Ccccc
Yes sir f is initialized to something other than...
Yes sir f is initialized to something other than 0.:)
BUT, the code is not loop like I though it would. I enter one number, the answer is given, and then it gets out of the code and goes back to the...
1,592
Posted By Ccccc
Where do I ask the question?
Hello. I have a variable $num that has values 1-9.
I want to put in a statement saying

if $num != seq 1 9
then
echo "Invalid entry. Use numbers 1-9. "

Do I put it before, in, or after my...
1,215
Posted By Ccccc
How is shell reading this?
ahhhhhhhhhhhhhhhhhhhhh...
Thank you.:)
1,215
Posted By Ccccc
How is shell reading this?
Morning (or evening) all.
I have some code:
tput cup 21 1 ; echo "Press ENTER to continue. . . "
read prompt
Nowhere do I see "prompt" define.
How is shell reading prompt? I'm so used to writing...
7,097
Posted By Ccccc
Syntax err near unexpected token...
I've been looking at this code too long. Maybe a fresh set of eyes can spot the:
"syntax error near unexpected token `(' ./phmenu ` tput cup 18 4: echo "Accept? (y) es or (n)o: "
...
1,252
Posted By Ccccc
Thanks for the explanation scottn. :)
Thanks for the explanation scottn.
:)
1,252
Posted By Ccccc
I got it guys. Whew. This is what I did: ...
I got it guys. Whew.

This is what I did:
cp -r /home/Ccccc/Ch6/source/* Ch7

used small "r" and added "*"
Thanks everyone.
1,252
Posted By Ccccc
Where are the files????
If you copy a directory to another directory, shouldn't the files of the source directory be in the destination directory?

cp -R/home/Ccccc/Ch6/source Ch7

I also ran cp...
4,249
Posted By Ccccc
Copy dir/file from one place to another.
Hello all.
I'm not getting the hang of Paths. I have a dir w/files that I want to copy to another dir. Right now I am in the "source" directory. I want to copy it to Ch7.

"cp -r source Ch7". Ch7...
3,487
Posted By Ccccc
And of course I knew that also Neo. Thanks for...
And of course I knew that also Neo.
Thanks for your help.
5,747
Posted By Ccccc
Do you mean something such as this? ...
Do you mean something such as this?

bold=`tput smso`
offbole=`tput rmso`
read num ; echo "${bold} $num ${offbold}"
5,747
Posted By Ccccc
Bold 1 word in a shell script
I want to bold one word in shell script. I want the value for num bold when it is inputted. My code does not bold the value. It's like its not even there.

echo -n "Please read a number"
read...
2,157
Posted By Ccccc
Thank you. It works beautifully. Ccccc
Thank you. It works beautifully.
Ccccc
Showing results 1 to 25 of 45

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