10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear ALL,
I have sample file :
tx_bytes: 2422,
tx_packets: 13,
uptime: 16119,
tx_bytes: 2342,
tx_packets: 14,
uptime: 11009,
tx_bytes: 252,
tx_packets: 12,
uptime: 3113,
my formula :
minutes=$(( uptime/60%60 ))
hours=$(( uptime/60/60%24 )) (3 Replies)
Discussion started by: gnulyn
3 Replies
2. UNIX for Dummies Questions & Answers
We have large log files, and we need to extract last four hours lines only,
Please let us know the command.
Thanks,
Saurau. (1 Reply)
Discussion started by: saurau
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I have two files, f1 and f2. f1 has 5 columns like so:
a b c d 154
e f g h 365
.....
f2 has two columns, the first column contains the name of the above file and second column contains a constant which is to be used for division.
e.g.
file1 56
I want to divide the 5th... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
4. Shell Programming and Scripting
Hi,
I've been working on a few scripts and have been getting great info.
How, would I include in the below script, how I would let a user know that if they divide a SECOND number by zero, that they would get a divide by zero error? What's the easiest way of working this?
Cordially,
joe.
... (1 Reply)
Discussion started by: jefferj54
1 Replies
5. Shell Programming and Scripting
Hi All,
here D Prints the bytes value .plz help to convert the variable D value to MB in new variable $E
D=`more $C |awk '{print $6;}'`
Thanks in Advance.:) (3 Replies)
Discussion started by: netdbaind
3 Replies
6. Shell Programming and Scripting
I have a file, let's say X
BTS 0 UNLOCKED ENABLED NONE
TRX 0 UNLOCKED ENABLED NONE
TRX 1 UNLOCKED ENABLED NONE
BTS 1 UNLOCKED ENABLED NONE
TRX 0 UNLOCKED ENABLED NONE... (4 Replies)
Discussion started by: amaulana
4 Replies
7. UNIX for Dummies Questions & Answers
I'm new at this and frustratd because I know this must be simple but here goes. I'm trying to write a script that will give me the percentage of a particular field over multiple text files.
Each day I have around 1500 files that are generated. Each file has around 100 lines in it. The lines... (3 Replies)
Discussion started by: mikez104
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a issue dividing 2 values in UNIX
a=15
b=100
c = a / b ==> and it is returning 0 instead of 0.15 into variable C.
How can i resolve this issue ? please help (1 Reply)
Discussion started by: kotasateesh
1 Replies
9. Shell Programming and Scripting
Dear,
i want to devide the first 4 values from a raw over the next 4 values like the following:
$1+$2+$3+$4 / $5+$6+$7+$8
using AWK ....can someone help me?
Sanks (1 Reply)
Discussion started by: tontal
1 Replies
10. Shell Programming and Scripting
i need to divide this count by 2, what variable can i use in my script?
26 hcscprod_cpus_totals /2 = 13
13 hcncprod_cpus_totals /2= 6.5
541 ktazp_cpus_totals /2= 270.5
346 ktazd_cpus_totals /2=173
110 ktazi_cpus_totals /2=55
10 ktazq_cpus_totals /2=5 (2 Replies)
Discussion started by: wereyou
2 Replies