12-04-2017
Should pick latest file within past 3 days using UNIX script and perform steps in message below.
Hi ,
Can anyone help me how do perform below requirement in unix.
Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat)
Filenames:
1)
abc_20171204_052389.dat
2)
abc_20171204_052428.dat
Moderator's Comments:
|
|
DON'T modify posts if others already referenced it, pulling the rug from under their feet!
|
|
Step2:we should pick the file which has received date within the past 3 days.
step3:We should read the files which has text ‘
S A M P L E’ in the files starting at position 31 on line 19 .
step4:Once we identify the file which has text ‘
S A M P L E’ than pick that file and should look for '
GENERIC' and copy all the data which has '
GENERIC' to
other file.
Last edited by RudiC; 12-05-2017 at 12:34 PM..
Reason: Add ICODE tags.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I would like to list latest 2 days, 3 days or 4 days,etc of files in the directory...
how? is it using ls? (3 Replies)
Discussion started by: happyv
3 Replies
2. Shell Programming and Scripting
Hi ,
I have a file abc.txt which actually contains a directory and file list
-rwxrwxr-x 1 dmadmin mmasapp 334 Dec 03 2001 aafs_006.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1270 Nov 13 2001 mcl_deposit_ftp.ksh
-rwxrwxr-x 1 dmadmin mmasapp 925 Oct 31 2001 ... (1 Reply)
Discussion started by: viv1
1 Replies
3. UNIX for Dummies Questions & Answers
I have a requirement which will select the files with a specific naming convention which got created in past 7 days in a specific directory.Lets say the directory is /data/XYZ and the file names follow the below nomenclature like Daily_File*.txt
I just need to create one CSV file which will... (12 Replies)
Discussion started by: dr46014
12 Replies
4. Shell Programming and Scripting
Hi All,
I have a file which contains the listing of another directory:
>cat list.dat
-rwxr-xr-x 1 test staff 10240 Oct 02 06:53 test.txtdd
-rwxrwxrwx 1 test staff 0 Oct 04 07:22 test.txx
-rwxrwxrwx 1 test staff 132 Sep 16 2007 test_tt.sh... (6 Replies)
Discussion started by: deepakgang
6 Replies
5. UNIX for Dummies Questions & Answers
Suppose I have a unix file which contain a lost of 60 files like
filename1
filename2
...
..
...
filename60
I want to write a unix script that will pick up first 10 files in first run
10-20 files in 2 run
20-30 files in 3 run
30-40 files in 4 run
40-50 files in 5 run
50-60 files in 6... (1 Reply)
Discussion started by: er_zeeshan05
1 Replies
6. Shell Programming and Scripting
in the below .. i want to pick the latest logfile which is having JPS.PR inside..
that means i want particularly "spgport040408041223.log:@@@@@@@@ 04:13:09 Adding: JPS.PR."
which is latest among these..
is it possible to compare the current time with logfile time ?
reptm@xblr0758rop>... (4 Replies)
Discussion started by: mail2sant
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have some list of directories in the form datemonthyear e.g. 02082009, 03082009 and 04082009 etc.
I need to pick the latest directory from the current working directory.
Outcome:
05082009
This is the output am expecting.
Thanks (6 Replies)
Discussion started by: venkatesht
6 Replies
8. UNIX for Dummies Questions & Answers
Hi
In my script i am trying to access mainframe server using FTP,
in the server i have filee with the timestamp.I need to get the file with the latest timestamp among them . The server has the below files
/
ftp> cd /outbox
250 CWD command successful
ftp> ls
200 PORT command successful... (4 Replies)
Discussion started by: laxmi131
4 Replies
9. Shell Programming and Scripting
I wan to pick the latest modified file name and redirect it to a file ..
ls -tr | tail -1 >file
but this is printing file ins side the filename ,
can anyone help me out (5 Replies)
Discussion started by: vishwakar
5 Replies
10. Shell Programming and Scripting
3679 Jul 21 23:59 belk_rpo_error_**po9324892**_07212014.log
0 Jul 22 23:59 belk_rpo_error_**po9324892**_07222014.log
3679 Jul 23 23:59 belk_rpo_error_**po9324892**_07232014.log
22 Jul 22 06:30 belk_rpo_error_**po9324267**_07012014.log
0 Jul 20 05:50... (5 Replies)
Discussion started by: LoneRanger
5 Replies
LEARN ABOUT DEBIAN
unknown
UNKNOWN(1) General Commands Manual UNKNOWN(1)
NAME
unknown - identify possible genotypes for unknowns
SYNOPSIS
A program to rapidly identify which genotypes are possible for individuals typed as unknowns in the input pedigree.
unknown [ -cl ]
DESCRIPTION
unknown infers possible genotypes and mating combinations for parents with unknown genotypes for ilink(1), mlink(1) and linkmap(1).
OPTIONS
-c Use conditional allele frequencies.
-l Choose a good set of loop breakers automatically.
RETURN VALUE
0 Successful completion
ERRORS
10 File not found
255 Failure
EXAMPLES
Normally, unknown(1) is run immediately prior to its sister programs, ilink(1), mlink(1) and linkmap(1), like this:
unknown
mlink
FILES
unknown(1) reads the two files pedfile.dat and datafile.dat as its own input and produces various temporary files that are used as input to
the next program. These temporary files are ipedfile.dat, upedfile.dat, speedfile.dat and newspeedfile.dat.
NOTES
unknown(1) is part of the FASTLINK package, which is a re-implementation of the LINKAGE suite of computer tools that help investigate
genetic linkage as first proposed G.M. Lathrop, J.M. Lalouel, C. Julier, and J. Ott.
AUTHORS
Dylan Cooper, Alejandro Schaffer, and Tony Schurtz based on work originally by Jurg Ott, Ph.D, et. al.
This manual page was written by Elizabeth Barham <lizzy@soggytrousers.net> for the Debian GNU/Linux system (but may be used by others).
WORD-WIDE-WEB
http://www.ncbi.nlm.nih.gov/CBBResearch/Schaffer/fastlink.html
SEE ALSO
ilink(1), linkmap(1), lodscore(1), mlink(1).
April 15, 2003 UNKNOWN(1)