Quote:
Originally Posted by
Rajendra Kalepu
Hi Team,
I am new to shell scripting. I have the below requirement
1) Say if i am searching for 20160815 in a directory /dir
2) Now i need to get the files present in dir whose time stamp in greater than or equal to 20160815
3) Then i need to find the string 20160815 from the set of files received in point 2
4) Now i need to get the final file name as output
I visited many forums to understand how to loop through files. Please help me in this regard
Thanks and Regards
Raj
Is this a homework assignment? Homework and coursework questions can only be posted in
the Homework and Coursework forum under
special homework rules.
If this is not homework, please explain the company you work for and the nature of the problem you are working on.
If you did post homework in the main forums, please review the
guidelines for posting homework and repost.
If this is not homework, please explain what "
searching for 20160815 in a directory" means. Are you looking for a file named
20160815? Are you looking for a file with a name containing the string
20160815? Are you looking for a file containing the string
20160815? Are you looking for a file in the directory
/dir or are you looking for a file in a directory somewhere in the file hierarchy rooted in
/dir?
Standards conforming filesystems have at least three timestamps (last file status change time, last access time, and last file modification time). For which time stamp are you looking?
How do you "
find the string 20160815 from the set of files received in point 2"? Are you looking for a file named
20160815? Are you looking for a file with a name containing the string
20160815? Are you looking a file containing the string
20160815?