10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I wish to compare the CPU LOAD 1 min with 5mins and 15mins.
If 1 min's CPU LOAd spike 3% compare to 5 mins or 15 mins CPU Load, it is warning.
If 1 min's CPU LOAd spike 5% compare to 5 mins or 15 mins CPU Load, it is critical.
However I received following code error, I google it and... (10 Replies)
Discussion started by: alvintiow
10 Replies
2. UNIX for Dummies Questions & Answers
Hi experts,
I'm facing trouble with the below bash script, any help is appreciated
#!/usr/bin/bash
..
if (( "${date1}" > "${l_date1}" ))
then
echo "success"
else
echo "nothing"
fi
the variable date1 contains 08/06/2013 and l_date1 contains 10/08/2013
this small script to... (6 Replies)
Discussion started by: parpaa
6 Replies
3. Shell Programming and Scripting
I have a script which is migrated from AIX to Linux & now while running it is no able to concatenate string values
The string concatenation step under while loop is not displaying desired result
Please find below the piece of code:
while read EXT_FILE ; do
EXT_FILE=$EXT_FILE.ext.sent
echo... (7 Replies)
Discussion started by: PreetArul
7 Replies
4. Shell Programming and Scripting
Hi,
I have two files.
cat file.txt
a
b
c
d
cat file1.txt
j
k
l
m
I need the output as
a:j (12 Replies)
Discussion started by: nareshkumar522
12 Replies
5. Shell Programming and Scripting
i'm trying to make a script to simply add numbers together
for example i have a file script file called add
add 1 2 3 4 5
15
however i want the user to put at least 3 numbers so i did this
if
then
echo "please enter more than two numbers"
exit 1
fi
but it's telling me i have... (3 Replies)
Discussion started by: el3ctr0nic47
3 Replies
6. UNIX for Dummies Questions & Answers
hi,
i have a bash script that i want to receive a a string from another bash file. But because the string has a dot in the middle it gives me an error. The error is in this line:
let valor=$1
and the value passed is rules.txt
the error is:
let: valor=rules.txt: syntax error: invalid... (2 Replies)
Discussion started by: limadario
2 Replies
7. Shell Programming and Scripting
Hi All,
I need to concatenate the values in the array into a variable. Currently the code is :
for (( i=1 ; i <= $minCount ; i++ ))
do
var="${var}""${sample_file}"
done
The output is :
/tmp/1/tmp/2/tmp/3/tmp/4/tmp/5/tmp/6/tmp/7/tmp/8/tmp/9/tmp/10
I need a space between... (1 Reply)
Discussion started by: sh_kk
1 Replies
8. Shell Programming and Scripting
Hi,
I have a variable $ID=40 and I need to build a string like
40 40 40 40 40 40
so repeating ID 'n' times separated by spaces.
Any help?
Thanks
Sarah (2 Replies)
Discussion started by: f_o_555
2 Replies
9. Shell Programming and Scripting
Hello,
in my script i have this lines of code in a while cycle:
..
let j=i+1
t_prod_$i = `cat myfile.csv | grep world | cut -d ";" -f$j`
let i+=1
...
So if i try an echo $t_prod_$i at the end of the cycle i cannot see
the right value obtained by `cat myfile.csv | grep world |... (5 Replies)
Discussion started by: drain
5 Replies
10. UNIX for Dummies Questions & Answers
my input file contains thousands of lines like below
234A dept of education
9788 dept of commerce
8677 dept of engineering
How do i add a delimeter ':' after FIRST 4 CHARACTERS in a line
234A:dept of education
9788:dept of commerce
8677:dept of engineering (7 Replies)
Discussion started by: systemsb
7 Replies