I need to get the count of records in the file, if the passing parameter matches with the list of records in the file. Below is my example
In my script I am deriving the processing date. I need to check how many files are there with the current processing date. based on the return count I need to send a mail.
For the above file, If I pass 20120912 as parameter
Please help me how to write a Awk script for this requirement.
Hi there,
I am writing a script to look for tmp log files that have not been access within the last 10 days.
I am using the follwing command within the script:
find /var/tmp -name *log -atime -9 ¦xargs
What I would like to be able to do would be to display a message if there is no... (3 Replies)
Hello, can someone help me how to find a word and 2 lines after it and then send the output to another file.
For example, here is myfile1.txt. I want to search for "Error" and 2 lines below it and send it to myfile2.txt
I tried with grep -A but it's not supported on my system.
I tried with awk,... (4 Replies)
I'm using awk to determine if a field starting in position 604 for length of 10 is not equal to ALL spaces. It's searching several files which are in the current directory.
The below awk indicates that there are 84 records on all files where this field IS NOT equal to ALL spaces ( there are 10... (2 Replies)
Hi all I have a need of searching some pattern in file by month and then count unique records
D11
G11
R11 -------> Pattern available in file
S11
Jan$1 to $5 column contains some records in which I want to find unique
for this purpose I have written script like below
awk '/Jan/ ||... (4 Replies)
Hi,
I have FileA with one column.
File B with 15 columns separated by comma delimiter.
I need to compare the FILEA value with all 15 columns of FILEB... if matches, need to return the 1st, 2nd column values of FILEB.
How to achieve this through shell script? Thanks in advance. (5 Replies)
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Trying to use awk to find a keyword and return the matches in the row, but also $1 and $2, which are the unique id's, but they only appear once. Thank you :).
file
name 31 Index Chromosomal Position Gene Inheritance
122 2106725 TSC2 AD
124 2115481 TSC2 AD
121 2105400 TSC2 AD... (6 Replies)
Trying to combine the matching $5 values between file1 and file2. If a match is found then the last $6 value in the match and the sum of $7 are outputted to a new file. The awk below I hope is a good start. Thank you :).
file1
chr12 9221325 9221448 chr12:9221325-9221448 A2M 1... (5 Replies)
Trying to get the unique count of the below input, but if the text in beginning of $5 is a partial match to another line in the file then it is not unique.
awk
awk '!seen++ {n++} END {print n}' input
7 input
chr1 159174749 159174770 chr1:159174749-159174770 ACKR1
chr1 ... (2 Replies)
In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT REDHAT
amdd
AMDD(8) System Manager's Manual AMDD(8)NAME
amdd - Amanda version of dd
SYNOPSIS
amdd [ -d ] [ if=input ] [ of=output ] [ bs=blocksize ] [ skip=count ] [ count=count ]
DESCRIPTION
Amdd provides just enough of the standard dd command for the needs of Amanda. This is handy when doing a full restore and the standard dd
program has not yet been found.
Amdd also provides access to the Amanda output drivers that support various tape simulations. This may be used for debugging or to convert
from one format to another.
See the amanda(8) man page for more details about Amanda. See the OUTPUT DRIVERS section of amanda(8) for more information on the Amanda
output drivers.
OPTIONS -d Turn on debugging output.
-llength
Set the output length. If the output driver limits the output size, this controls when end of tape will be simulated.
Length may have a multiplier suffix:
k 1024 (Kilobytes)
b 512 (Blocks)
M 1024*1024 (Megabytes)
The default is no multipler (bytes).
if=input
Input to dd. Default is stdin.
of=output
Where to send the output of dd. Default is stdout.
bs=blocksize
Size of each record. Input records smaller than this will not be padded. Output records will be the same size as the corresponding
input record. Default is 512 bytes.
Blocksize may have a multiplier suffix:
k 1024 (Kilobytes)
b 512 (Blocks)
M 1024*1024 (Megabytes)
The default is no multipler (bytes).
count=count
Number of records to copy. Default is all records until end of file.
skip=count
Number of records to skip before copying input to output. Default is zero.
AUTHOR
Marc Mengel <mengel@fnal.gov>
John R. Jackson <jrj@purdue.edu>
SEE ALSO amanda(8)AMDD(8)