10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use AWK to read a file, comma delimited, and check each field to see if it has a suffix of - (dash , minus sign) if so then I want to either move the minus sign the the beginning of the field or take the numeric portion of the field and multiply it by negative 1 to get the field... (9 Replies)
Discussion started by: ziggy6
9 Replies
2. Shell Programming and Scripting
Gents,
I have a file where i would like to check the constant increment by 2 in column 2.
5450 1000
5450 1002
5450 1004
5450 1006
5465 1000
5465 1002
5465 1006
5465 1008
5550 1002
5550 1004
5550 1006
5550 1008
6830 1000
6830 1002
6830 1008
6830 1010 (6 Replies)
Discussion started by: jiam912
6 Replies
3. Red Hat
hey, i have stored values of query like this
val_2=$( sqlplus -s rte/rted1@rel75d1 << EOF
set heading off
select source_id from cvt_istats where istat_id > $val_1;
exit
EOF
)
echo $val_2
now , val_2 has five values displayed like this
1
2
3
4
5
what i have to do is to check the... (1 Reply)
Discussion started by: ramsavi
1 Replies
4. Red Hat
i stored some values in array , then i traverse through the array and check for
some values and if they exist then echo success.
let us consider that in our array we stored values from an sql query
like this
#!/bin/bash
declare -a arr
arr=$( sqlplus -s rte/rted2@rel76d2 << EOF
set... (1 Reply)
Discussion started by: ramsavi
1 Replies
5. Shell Programming and Scripting
Hi ,
I have below data with fixed with of 52 bytes having three columns value data.
01930 MA GLOUCESTER
02033
02025 COHASSET
01960 MA ... (3 Replies)
Discussion started by: sonu_pal
3 Replies
6. Solaris
Any native Solaris commands/scripts to check the utilization of kernel tables/limits in Solaris ? (like equivalent command in HPUX is kcusage) (2 Replies)
Discussion started by: thamurali
2 Replies
7. Shell Programming and Scripting
Hi,
I have a tab delimited file in which first row is the header and others rows has the values.
A B C D
2 4 0.00 3.00
0.00 9.78 4654 898
I have to check whether all the values are zero.
A B C D
0.00 0 0.00 0.00
0.00 0.00 0 0.000
Send mail if all the values in file are zero (4 Replies)
Discussion started by: sandy1028
4 Replies
8. Shell Programming and Scripting
How to check if the file contains only numeric values.
I don't want to read entire file it eats lot of cpu
Or any way which consumes less memory n cpu..
Please suggest
-S (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies
9. Shell Programming and Scripting
HI ,
I have to check the values of variable is blank or not.
exm :
###test
test1
var=`cate filename | head -1 | cut -c1-3`
I need to check the first three character of 1st line . if it is blank .then exit or we need to process .
Thanks in advance . (2 Replies)
Discussion started by: julirani
2 Replies
10. Shell Programming and Scripting
Hello,
Do you have any idea why the below sed command is also replacing the value of "PARAMETER2" instead of just "PARAMETER" in file1 ?
% parameter=PARAMETER
% new_value=2
% cat file1
PARAMETER=1
PARAMETER2=1
% cat file1 | sed s/*$/${new_value}/1
PARAMETER=2
PARAMETER2=2
Thanks. (3 Replies)
Discussion started by: majormark
3 Replies