shanthakumar
New Member
Have a requirement to pull below files from Remote server in /Inbox Folder. So the files names is not static always but changing everyday.
But Format is SWIFT.vote.[!K][!R]$prevdate*.CSV
prevdate="$(date "+%y%m%d" -d "1 day ago")" -- 230326
Remote Server:
cd /Inbox
SWIFT.vote.ZA2303261725.CSV
SWIFT.vote.MY2303261795.CSV
SWIFT.vote.IN2303268925.CSV
Previously, we were using below query and pulled all the files since it had wild card.
sftp -oPort=5028 [email protected]:/cidschk/SWIFT.vote.[!K][!R]1$prevdate*.CSV /home/tcssupp/prd/SI/NCSHOME/SIHOME/datafiles/BROADRIDGE_LANDING/broad/dld/Other/secfeed
But now the client asked us to use CuRL to do the same.
so, the problem is am using below query to get single file but i need to download all the files from /Inbox folder like Wild card that is used above in sftp.
Works:
curl -x 10.14.241.190:443 -p "sftp://167.212.18.125:22/Inbox/SWIFT.vote.IN12211171725.CSV" -vk -u SCBKGLB01EBQ: --key /home/tcssupp/.ssh/id_rsa -o "/home/tcssupp/SWIFT.vote.MY12211171725.CSV"
Not working
curl -x 10.14.241.190:443 -p "sftp://167.212.18.125:22/Inbox/ SWIFT.vote.[!K][!R]1$prevdate*.CSV " -vk -u SCBKGLB01EBQ: --key /home/tcssupp/.ssh/id_rsa -o "/home/tcssupp/ SWIFT.vote.[!K][!R]1$prevdate*.CSV "
Kindly help with your expertise to solve the issue.
But Format is SWIFT.vote.[!K][!R]$prevdate*.CSV
prevdate="$(date "+%y%m%d" -d "1 day ago")" -- 230326
Remote Server:
cd /Inbox
SWIFT.vote.ZA2303261725.CSV
SWIFT.vote.MY2303261795.CSV
SWIFT.vote.IN2303268925.CSV
Previously, we were using below query and pulled all the files since it had wild card.
sftp -oPort=5028 [email protected]:/cidschk/SWIFT.vote.[!K][!R]1$prevdate*.CSV /home/tcssupp/prd/SI/NCSHOME/SIHOME/datafiles/BROADRIDGE_LANDING/broad/dld/Other/secfeed
But now the client asked us to use CuRL to do the same.
so, the problem is am using below query to get single file but i need to download all the files from /Inbox folder like Wild card that is used above in sftp.
Works:
curl -x 10.14.241.190:443 -p "sftp://167.212.18.125:22/Inbox/SWIFT.vote.IN12211171725.CSV" -vk -u SCBKGLB01EBQ: --key /home/tcssupp/.ssh/id_rsa -o "/home/tcssupp/SWIFT.vote.MY12211171725.CSV"
Not working
curl -x 10.14.241.190:443 -p "sftp://167.212.18.125:22/Inbox/ SWIFT.vote.[!K][!R]1$prevdate*.CSV " -vk -u SCBKGLB01EBQ: --key /home/tcssupp/.ssh/id_rsa -o "/home/tcssupp/ SWIFT.vote.[!K][!R]1$prevdate*.CSV "
Kindly help with your expertise to solve the issue.