9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. Shell Programming and Scripting
I have data files that look like this, say data.txt
0.00833 6.34
0.00833 6.95
0.00833 7.08
0.00833 8.07
0.00833 8.12
0.00833 8.26
0.00833 8.70
0.00833 9.36
0.01667 20.53
0.01667 6.35
0.01667 6.94
0.01667 7.07
0.01667 8.06
0.01667 8.10
0.01667 8.25
0.01667 8.71
0.01667 9.31... (7 Replies)
Discussion started by: malandisa
7 Replies
3. Shell Programming and Scripting
Hi,
I want to calculate diff b/w these starttime and endtime with use of mktime. I need response time in milisecond. I am using mktime to get these times. last three digits are in milisecond
Starttime 2013-04-03 08:54:19,989
End time 2013-04-03 08:54:39,389 (9 Replies)
Discussion started by: random_thoughts
9 Replies
4. Shell Programming and Scripting
Hi
i need to calculate the total of a column from a file in ksh
vi file.txt
System : CBSE ent=0.1 me=Cap
Subject Maths Science
xxxxx 56 98
yyyy 89 67
ooo 67 32
Here i need to calculate only the total of Maths column alone i.e., 56+89+67
... (4 Replies)
Discussion started by: Priresh
4 Replies
5. Shell Programming and Scripting
I am relatively new to Unix and I would be grateful if someone could help me with the syntax of a script.
I am trying to write a Unix script against the file ‘ajtest.dat’ (see below) so that it outputs the number of rows and total value of column 3 in a file called ‘aj1’ as follows:
No. of... (11 Replies)
Discussion started by: ajmutley
11 Replies
6. Shell Programming and Scripting
Looking for a shell script or a simple perl script . I am new to scripting and not very good at it .
I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report.
... (0 Replies)
Discussion started by: breez_drew
0 Replies
7. Shell Programming and Scripting
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies
8. Shell Programming and Scripting
Guys, have any idea for the script like this? also to compute w/ decimal.
thanks
a=10
b=20
c=30
d=40
if a < b then ( a -b)*1024 = free space
b + (c -d) = total space
if a > b then (b / d)*1024 = cpu (3 Replies)
Discussion started by: kenshinhimura
3 Replies
9. UNIX for Dummies Questions & Answers
Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies