Hi all,
I have in one script something like this:
FIRSTOCC=`grep -n ORA- alert_bill2.log |tail -"$ROWS"|head -1|cut -d: -f1`
TOTAL=`more alert*|wc -l`
DIFFERENCE=`$TOTAL-$FIRSTOCC`
echo Total lines in alert_bill = $TOTAL
echo $DIFFERENCE
How do I make this substraction work?
Thk (2 Replies)
1) when user login to the server the session got colosed. How will resolve?
2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem?
Thanks in advance. (1 Reply)
hello
i have obtained the current date ..
current_date=date "+%m/%d%y"
and i have another date ,stored in my log file which i have already retrieved. i want to store the subtraction in a varible called diff.
diff=log_date - currentdate
ex: log_date=01/28/11
current_date=... (3 Replies)
count=`cat /filecount.txt | tail -1 |head -1| awk '{print $1}'`
exact_count=`expr $value \* 24`
i want to subtract a="$exact_count" - "$count"
but its not taking o/p of "count" as number
$a is wrong answer
hence not getting proper output.
plz help me out
:confused:
Please use... (3 Replies)
I want to try solving system of linear algebraic equations in Shell bash but i have any problems Value input is matrix and I dont know how to input matrix in Shell because that is dont support 2-dimensional array Please help me. Thank you so much (3 Replies)
Hello friends,
I am new on linux, i am facing issues on below script.
#!/bin/sh
current=1355147377
echo $current
last_modified=1354537347
echo $last_modified
DIFF='expr ($current - $last_modified)'
echo $DIFF
Please view this code tag video for how to use code tags when posting... (8 Replies)
Hi everyone,
I am trying to write a bash script which reads a data file and does some algebraic operations.
here is the structure of data.xml file that I have;
1 <data>
2 .
3 .
4 .
5 </data>
6 <data>
7 .
8 .
9 .
10</data>
etc.
Each data block contains same number of lines (say... (4 Replies)