The following awk command will do that:
That is, consider only lines measured in days - this scheme will fail if you encounter abbreviated month or years in your date format.
I have following command which tells me File size in GBs which are greater than 0.01GBs recursively in a dir structure.
ls -l -R | awk '{ if ($5/1073741824 >= 0.01) print $9, $5/1073741824 }'
But there are some files whom I dont have enough permissions, after executing this script
gives me... (1 Reply)
Hi All,
I have the below input and expected ouput. I need a code which can scan through this input file and if the number in column1 is more than 1 , it will print out the whole line, else it will output "No Re-occurrence". Can anybody help ?
Input:
1 vvvvv 20 7 7 23 0 64
6 zzzzzz 11 5... (7 Replies)
file1 contain: (this just a small sample of data it may have thousand of lines)
1 aaa 1/01/1975 delhi
2 bbb 2/03/1977 mumbai
3 ccc 1/01/1975 mumbai
4 ddd 2/03/1977 chennai
5 aaa 1/01/1975 kolkatta
6 bbb 2/03/1977 bangalore
program:
nawk '{
idx= $2 SUBSEP $3
arr = (idx in arr) ?... (2 Replies)
Hello Gurus,
Please help me out of the problem. I ve a input file as below
input clock;
input a; //reset all
input b;
//input comment
output c;
output d;
output e;
input f;
//output comment
I need the output as follows:
\\Inputs (1 Reply)
Hi ,
i have file with delimiter as "|" and data in Double codes for all fields. how to filter data in a column like awk -F"|" '$1="asdf" {print $0}' test.
ex : "asdf"|"zxcv"
Thanks,
Soma (1 Reply)
I am trying to filter out some data with awk. If someone could help me that would be great. Below is my input file.
Date: 10-JUN-12 12:00:00
B 0: 00 00 00 00 10 00 16 28
B 120: 00 00 00 39 53 32 86 29
Date: 10-JUN-12 12:00:10
B 0: 00 00 00 00 10 01 11 22
B 120: 00 00 00 29 23 32 16 29... (5 Replies)
Hi,
I need to call an API (GetUsageDetails)from inside a shell script which takes an input argument acct_nbr.
The output of API will be like :
<usageAccum accumId="450" accumCaptn="PM_125" inclUnits="1410.00" inclUnitsUsed="744.00" shared="true" pooled="false" prorated="false"... (1 Reply)
Hi,
I have some data like seen below.
format : apple(hhmm mm/dd).fruit
apple(2345 03/25).fruit
apple(2345 05/06).fruit
orange(0443 05/02).fruit
orange(0345 05/05).fruit
orange(2134 05/04).fruit
grape(0930 04/24).fruit
grape(2330 03/30).fruit
I need to get the data which are... (1 Reply)
good evening,
i'm still new in scripting but i'm learning every day and i'm enjoying it.
so i have api website (htt p://api.nobelprize.org/v1/prize.json), i want to make a script that allows me to give it two arguments like ./test.sh 2005 physics, 2000 is for the year and physics is category... (1 Reply)
Discussion started by: kalbsghir
1 Replies
LEARN ABOUT BSD
join
JOIN(1) General Commands Manual JOIN(1)NAME
join - relational database operator
SYNOPSIS
join [ options ] file1 file2
DESCRIPTION
Join forms, on the standard output, a join of the two relations specified by the lines of file1 and file2. If file1 is `-', the standard
input is used.
File1 and file2 must be sorted in increasing ASCII collating sequence on the fields on which they are to be joined, normally the first in
each line.
There is one line in the output for each pair of lines in file1 and file2 that have identical join fields. The output line normally con-
sists of the common field, then the rest of the line from file1, then the rest of the line from file2.
Fields are normally separated by blank, tab or newline. In this case, multiple separators count as one, and leading separators are dis-
carded.
These options are recognized:
-an In addition to the normal output, produce a line for each unpairable line in file n, where n is 1 or 2.
-e s Replace empty output fields by string s.
-jn m Join on the mth field of file n. If n is missing, use the mth field in each file.
-o list
Each output line comprises the fields specified in list, each element of which has the form n.m, where n is a file number and m is a
field number.
-tc Use character c as a separator (tab character). Every appearance of c in a line is significant.
SEE ALSO sort(1), comm(1), awk(1)BUGS
With default field separation, the collating sequence is that of sort -b; with -t, the sequence is that of a plain sort.
The conventions of join, sort, comm, uniq, look and awk(1) are wildly incongruous.
7th Edition April 29, 1985 JOIN(1)