[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Val Krem
Subject: copy
Date: Tue, 20 Jul 2021 21:38:20 +0000 (UTC)

Hi all,

In one folder I  have list of  several  files. Based on a condition (grep) I 
want pick the latest  file from all files  and and copy this file  to somehwere.

Here is my  sample  of the zipped files and my attempt
Sample  files

I used this,

 ll | grep -e  AB1 |tail -1
the result is

How do I copy this file to this folder?

"c:\data\AB1"  folder

my attempt

ll | grep -e  AB1 |tail -1  -exec bash -c 'cp "$1" c:\data\AB1

did not work.

Any help?

Thank you,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]