10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I was wondering whether anyone has any idea what is happening here. I'm using simple code to compare 2 tab delimited files based on column 1 values. If the column1 value of file1 exists in file2, then I'm to print the column4 value in file2 in column3 of file1. Here is my code:
1st I have to... (6 Replies)
Discussion started by: Geneanalyst
6 Replies
2. Shell Programming and Scripting
Hello scripting geeks,
I am new to scripting and facing some issues in writing the logic of the script. Request your kind help here
Actually when i run a command i get o/p as below
o/p :
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
these are hex values i guess...now i want to... (15 Replies)
Discussion started by: kulvant29
15 Replies
3. Shell Programming and Scripting
The awk below is supposed to count all the matching $5 strings and count how many $7 values is less than 20. I don't think I need the portion in bold as I do not need any decimal point or format, but can not seem to get the correct counts. Thank you :).
file
chr5 77316500 77316628 ... (6 Replies)
Discussion started by: cmccabe
6 Replies
4. Shell Programming and Scripting
Hi All,
I am looking to filter out filesystems which are greter than a specific value.
I use the command
df -h | awk '$4 >=70.00 {print $4,$5}'
But this results out as below, which also gives for lower values.
9% /u01
86% /home
8% /u01/data
82% /install
70% /u01/app
Looks... (3 Replies)
Discussion started by: jjoy
3 Replies
5. Shell Programming and Scripting
cat T|awk -v format=$format '{ SUM += $1} END { printf format,SUM}'
the file T has below data
usghrt45tf:hrguat:/home/hrguat $ cat T
-1363000.00123456789
-95000.00789456123
-986000.0045612378
-594000.0015978
-368939.54159753258415
-310259.0578945612
-133197.37123456789... (4 Replies)
Discussion started by: zulfi123786
4 Replies
6. Shell Programming and Scripting
Hello,
I couldn't find anything on the Forum that would help me to solve this problem. Could any body help me process below data using awk?
I have got two files:
file1:
Worker1: Thomas
Position: Manager
Department: Sales
Salary: $5,000
Worker2: Jason
Position: ... (5 Replies)
Discussion started by: killerbee
5 Replies
7. Shell Programming and Scripting
Hi,
I would like:
FastEthernet0/0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0 collisions, 0 interface resets
Serial1/0:0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0... (14 Replies)
Discussion started by: mv652
14 Replies
8. Shell Programming and Scripting
nawk -F, 'FNR==NR{a= $3 ;next} $2 in a{print $1, 'Person',$2, a}' OFS=, filea fileb
Input filea
Input fileb
output i am getting : (2 Replies)
Discussion started by: pinnacle
2 Replies
9. Shell Programming and Scripting
I am using the following command:
nawk -F"," 'NR==FNR {a=$1;next} a {print a,$1,$2,$3}' file1 file2
I am getting 40 records output.
But when i import file1 and file2 in MS Access i get 140 records.
And i know 140 is correct count.
Appreciate your help on correcting the above script (5 Replies)
Discussion started by: pinnacle
5 Replies
10. Shell Programming and Scripting
I'm using the below command to list files older than 2 hours but it returns redundant output, am I missing something.
# find . -mmin +120 -exec ls -l {} \;
total 0
-rw-r--r-- 1 root system 0 Oct 13 09:52 test1
-rw-r--r-- 1 root system 0 Oct 13 09:52 test2
-rw-r--r-- 1 root ... (5 Replies)
Discussion started by: mbak
5 Replies