How to use scp for case insensitive copy?

Hi,

I have a requirement to copy files from one server to other using SCP.
I am using * to copy files as I just need to pick up the files that are ending with .OK. But few ok files are in upper case and few are in lower case. If I am using below code, only files with upper case OK are being picked up.

Is there any way to make scp case insensitive or to combine it with grep.

Please help.

 scp -B -p ${Auser}@${aSrcHOST}:${aSrcDIR}/*.OK $aTgtDIR

Try:

scp -B -p ${Auser}@${aSrcHOST}:${aSrcDIR}/*.[Oo][Kk] $aTgtDIR
1 Like