10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Here is the output using bash profile on Linux
uptime
04:59:14 up 16 days, 4:48, 2 users, load average: 1.00, 1.00, 1.20
Here is the output using bash profile on Solaris
uptime
4:00am up 84 day(s), 22:21, 3 users, load average: 0.09, 0.10, 0.12
Now,... (4 Replies)
Discussion started by: mohtashims
4 Replies
2. Shell Programming and Scripting
can any one identify why this command keeps resulting in 1, even though the string i'm searching for actually does not exist in the log?
awk 'BEGIN{count++} NR>220 && NR<=223 && /error/ && !/No.*such.*file.*or.*direfctory/ { count++ } END { print count }' /var/log/mail.log
i expected it to... (2 Replies)
Discussion started by: SkySmart
2 Replies
3. Shell Programming and Scripting
Hello im new here... Im trying to read file and create folders from words in it but i get this for loop error
awk : line 3 : syntax error at or near for
my code is..
#!/bin/bash
begin
for (( i=1;i<=5;i++));
do
awk -v i=$i $0 { print $i }
mkdir $i
done
{print $i}
end {}
i have... (7 Replies)
Discussion started by: boxstep
7 Replies
4. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
5. Shell Programming and Scripting
Hello Gurus,
I am firing the below command :
df -g | grep -v var| awk '{ (if $4 > 90% ) print "Filesystem", $NF,"over sized";}'
But I am getting the below error:-
======
syntax error The source line is 1.
The error context is
{if ($4 > >>> 90%) <<<
awk: The... (9 Replies)
Discussion started by: pokhraj_d
9 Replies
6. Solaris
I am using following code to connect to oracle database from solaris shell script. which will try thrice to connect the database ...at the 4rth atempt it will exir=t.
count=0
while ; do
sqlplus -s $usrname/$password@dbSID <<-EOF | tee $logfile
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR... (4 Replies)
Discussion started by: millan
4 Replies
7. Shell Programming and Scripting
Hi Friends,
the below script has been through the errors in sun solaris.
awk '/%s/{f=0 ;n++; print >(file="OUT_" n); close("OUT_" n-1)} f{ print > file}; /%s/{f=1}' $BASE_DIR/concat.TXT
awk: syntax error near line 1
awk: bailing out near line 1
And
ls $MERGE_DIR/*.R | awk '
{
... (2 Replies)
Discussion started by: krbala1985
2 Replies
8. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
9. Shell Programming and Scripting
ls filename*.txt | awk -F".Y" '$2 < $v_RUN_DT && $2 > $v_LOAD_DT'|awk ' NR==1'
I am getting this error . Can somebody plz point me where is the problem.
awk: 0602-562 Field $() is not correct.
The input line number is 1.
The source line number is 1. (16 Replies)
Discussion started by: RubinPat
16 Replies
10. UNIX for Dummies Questions & Answers
Hi everyone
first of all you should know that I've been working with solaris for a few days only. :)
I need to install some programs and I have had the following troubles:
1. When I used /.configure it showed the following message:
"no acceptable C compiler found in $PATH"
I included... (2 Replies)
Discussion started by: eldiego
2 Replies