9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Input:
|Running the Rsync|Sun Oct 16 22:48:01 BST 2016
|End of the Rsync|Sun Oct 16 22:49:54 BST 2016
|Running the Rsync|Sun Oct 16 22:54:01 BST 2016
|End of the Rsync|Sun Oct 16 22:55:45 BST 2016
|Running the Rsync|Sun Oct 16 23:00:02 BST 2016
|End of the Rsync|Sun Oct 16 23:01:44 BST 2016... (4 Replies)
Discussion started by: busyboy
4 Replies
2. Shell Programming and Scripting
Hi,
I have an awk command that I am using, and part of it sums COL_9 however when I read the output it is not including decimal places;
awk '
BEGIN{FS=OFS=","}
NR==1{print;next}
{a+=$9
c = $12
d = $18
}
END{for(i in a) {split(i,b,";"); print $1, $2, $3, b, $5, $6, b, b, a, $10, $11,... (1 Reply)
Discussion started by: Ads89
1 Replies
3. Shell Programming and Scripting
I would like to grep for aaa and bbb and ccc from one line in file1.txt in any order on a line on file2.txt
file1.txt
aaa bbb ccc
ddd fff ggg
hhh ddd jjj
jjj cccfile2.txt
aaa bbb ccc ddd fff ggg --> output whole line since it matches with aaa bbb ccc of file1.txt
aaa ddd jjj hhh --> no... (1 Reply)
Discussion started by: sdf
1 Replies
4. Shell Programming and Scripting
// AIX 5.3 & AIX 6.1
ls -al |awk '{print $5}'
This gives each file's size in byte.
I need to get:
- the sum of all files in Giga bytes with loop.
- excluding the size of directories (ls -al returns the size of directories).
There are hundreds and thousands of files, so summing up... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
5. Shell Programming and Scripting
Hi all,
I have a file having data:
@HWUSI-EAS1727:19:6:1:3674:984:0:1#GTTAATA
NTTGGGTTTTCT
@HWUSI-EAS1727:19:6:1:3674:984:0:1#GTTA...
NTTGGGTTTTCT
@HWUSI-EAS1727:19:6:1:3674:984:0:1#.....CT
NTTGGGTTTTCT
I want to print everything starting from # till line ends.
can you please help me how... (5 Replies)
Discussion started by: pirates.genome
5 Replies
6. Shell Programming and Scripting
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Discussion started by: sdf
10 Replies
7. Shell Programming and Scripting
Hi,
I am unable sum of each column in the loop usng awk command.
Awk is not allowing the parameters in the command.
i am facing the below error.
awk: 0602-562 Field $() is not correct.
Source file
abc.txt
100,200,300,400,500,600,700,800,900
101,201,301,401,501,601,701,801,901
... (1 Reply)
Discussion started by: number10
1 Replies
8. Shell Programming and Scripting
Hi all,
In a script like :
job_date=....
ls -l 2>/dev/null |
awk -v var =$job_date '
/Name\.Version\.+\.xml$/ {
How can i include a script variable job_date store in "var" in the pattern "/Name\.Version\.+\.xml$/"
Thanks in advance (12 Replies)
Discussion started by: abhinav192
12 Replies
9. Shell Programming and Scripting
Hello friends,
I couldnt connect two search patterns in awk, what i want is to search for two words in a log file;
"+MB)" and "Done"
i use this code
/usr/xpg4/bin/awk '/+MB)/ {gsub("\(","",$5);print int($5)}' mylog.txt
and i get integer part of (123,45MB) in a log file "mylog" with ... (1 Reply)
Discussion started by: EAGL€
1 Replies