Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Need Linux equivalent for UNIX

$
0
0
I have a folder called "log" which has a few sub-folders say "fda" "fd7" "fdd" "fd6 .... "

I wish to fire the below command inside each subfolder starting with the folder with the latest time stamp.
Code:


grep "$greptime.*exit" Prod.$(hostname).log | grep $fdrdate_new

If the seach did not yield any results it should then seach inside the second latest sub folder till it reaches the oldest sub folder or if it finds the string.

Can you please suggest how can i on Linux.

Viewing all articles
Browse latest Browse all 16232

Trending Articles