10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Unix Gurus
Let's say I have the input files like the following. I need to pick the files based on my run date.
abcd_20180206.csv
abcd_20180213.csv
abcd_20180220.csv
abcd_20180227.csv
efgh_20180206.csv
efgh_20180220.csv
efgh_20180227.csv
ijkl_20180206.csv
ijkl_20180213.csv... (9 Replies)
Discussion started by: SK123
9 Replies
2. Shell Programming and Scripting
This is my file
vol0 285GB
vol0.snapshot 15GB
vol11_root 0GB
vol12_root 47GB
vol12_root.snapshot 2GB
I need the output
vol0 285GB,vol0.snapshot 15GB,sum-300GB
vol11_root 0GB,nosnap,sum-0Gb
vol12_root 47GB,vol12_root.snapshot 2GB,49GB
I was trying to use paste -d, --. But... (9 Replies)
Discussion started by: ranjancom2000
9 Replies
3. Shell Programming and Scripting
I need to sum values in text file in case duplicate row are present with same name and different value below is example of data in file i have and format i need.
Data in text file
20170308
PM,U,2
PM,U,113
PM,I,123
DA,U,135
DA,I,113
DA,I,1
20170309
PM,U,2
PM,U,1
PM,I,123
PM,I,1... (3 Replies)
Discussion started by: Adfire
3 Replies
4. Shell Programming and Scripting
I need to use awk to return lines in multiple files that contain a date between a start date and end date. The format of the date is as seen in column 3 in the following line.
A,1458147240,Mar 30 2015 12:54:00PM,s15u4chn ,2,GPS Major Alarm `clear`,component.Channel,10,15,0,138,183,,,Mar 16... (4 Replies)
Discussion started by: randman1
4 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone, i need help with a simple task. I have a file withe the format:
"01/20/2012 23:10:13.979","49","49","48","19"
"01/20/2012 23:15:13.969","47","47","48","18"
"01/20/2012 23:20:13.975","47","47","45","17"
"01/20/2012 23:25:13.980","44","44","44","17"
"01/20/2012... (3 Replies)
Discussion started by: civilianwarfare
3 Replies
6. Shell Programming and Scripting
Hi all,
I need to sum values for fields in a delimited file as below:
2010-03-05|||
2010-03-05|||123
2010-03-05|467.621|369.532|
2010-03-06|||
2010-03-06||2|
2010-03-06|||444
2010-03-07|||
2010-03-07|||
2010-03-07|655.456|1019.301|
Code used is:
nawk -F "|" ' { sum +=... (7 Replies)
Discussion started by: Katabatic
7 Replies
7. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies
8. Shell Programming and Scripting
Hi All,
I have some folder that are named "FOLDERYYYYMM". I'm trying to piece together a .sh script that will look for the folder with the date. How can I get shell to see the date? (3 Replies)
Discussion started by: bbbngowc
3 Replies
9. Shell Programming and Scripting
Hi,consider this fields,
$1 $2 $3
981 0 1
984 0 4
985 1 0
987 0 2
990 0 0
993 0 3
995 2 0
996 0 1
999 0 4
for each occurence of zero in column $2 and $3 I need to sum $1 fields, so for example, in this piece of code the result of $1 is 8910. I'm sure... (2 Replies)
Discussion started by: cv313x
2 Replies
10. UNIX for Dummies Questions & Answers
This goes deeper into the date thing. I want to be able to check the date and time stamp in or on a file to see what the time span is.
We have a job that runs several times an hour - kicked off through cron based on a trigger file. We want to keep track of each run and check the time between... (14 Replies)
Discussion started by: MizzGail
14 Replies