10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I know function has to be defined first - in sequence - before it can be used.
So the script has to be build "bottoms -up style, if you pardon my expression.
I am running into a problem reusing function and breaking the sequence.
It would be nice to be able to see the function... (10 Replies)
Discussion started by: annacreek
2. Shell Programming and Scripting
I'm trying to call some functions in the background so that I can multitask in this script. Not working so hot. The functions I call don't ever seem to get called. I'm doing it the exact same way in another script and it's working like a champ so I'm very confused. Here's a pretty simple repro:
... (7 Replies)
Discussion started by: stonkers
3. Shell Programming and Scripting
I read some variables in a file and assigned as name for each of them.
If I do echo I am able to see the values as 1.0E-05,3.4,5.0E-03 etc,
Now I want to do some mathematical operations with them.
expected ans is 5.0E-08
expected... (9 Replies)
Discussion started by: linuxUser_
4. Shell Programming and Scripting
this code below is very useful in calculating mean and quartiles. however, i would really like to translate it to awk without having to write to any external file:
sort -n $1 >$filename
rows=`wc -l $filename|cut -d' ' -f1`
q2=`echo "($rows+1)/2" |bc`
... (3 Replies)
Discussion started by: SkySmart
5. Homework & Coursework Questions
Hello Guys,For my homework I must write a shell script to do this serie,
http://upload.wikimedia.org/math/f/8/f/f8f543d9ecd01c4ecca2a0b7bc1234a2.pngI know that I must use the "bc" for that, but for the script's itself i have no idea,(beginner)
Can you plz just help me for have some idea?... (1 Reply)
Discussion started by: hamed.samie
6. Shell Programming and Scripting
I have a bash script with some functions as below and am wondering if I can use the variables declared in setup in the other functions and in the rest of the bash script.
none=0; low=1; medium=2; high=3; debug=4
... (7 Replies)
Discussion started by: kristinu
7. Shell Programming and Scripting
I have a bunch of xml file that needs to have edits made and I was wondering if a BASH script could handle it.
I would like the script to look within my xml files and replace all integers greater than 5px with a value that is 25% smaller. For example, 100px = 75px. Since the integers... (12 Replies)
Discussion started by: jl487
8. Shell Programming and Scripting
Okay, for reasons related to sourcing a script from another script, I've had to put my main loop into a function, and from there I call other functions. My problem then is exiting from deep within the function call stack.
I used to simply call exit, and that would accomplish what I... (1 Reply)
Discussion started by: brsett
9. Shell Programming and Scripting
This script is called fuu;
case $1 in
when i run fuu 2 i expect "two" like... (2 Replies)
Discussion started by: Tártaro
10. Shell Programming and Scripting
Please help for the following scenario:
1. Shell Scipt should receive 2 variables values (say a and b).
2. Within shell script, there should be division of those numbers (a/b).
3. The result should be whole number i.e. in case the result comes out to be 9.4, it should be returned as... (3 Replies)
Discussion started by: damansingh