File Movement between server's that have the same case-insensitive filename

Clash Royale CLAN TAG#URR8PPP
We have a table contains the file name's which are considered as inbound feed every week and one of the file name is as below
File_name :
FEB_MERC_DATA_??????.txt
Sample inbound file which we got in the month of January "FEB_MERC_DATA_201901.txt"
We have a FTP script which will connect to the target server and search the file with the format and copies the file to our local server . We will run this ftp script from our local server .
Script :
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Issue:
In the month of FEB the client started to send file name in lower case "feb_merc_data_201902.txt" Because of the lower case file naming the "MGET" function is unable to pick the files and not getting copied to our local server as of now for a temporary solution we have changed the configuration to lower case file name .
Does any one have solution regarding the mget function so that it can ignore the case sensitive while copying the file so that even though the client send's either in upper or lower case we should be able to copy the file to target directory.
I have tried by using "-i" in the below ftp script but its throwing error as
mget: Invalid flag -i
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget -i FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Does any one have solution for this ?
Thank you.
shell-script sftp expect
add a comment |
We have a table contains the file name's which are considered as inbound feed every week and one of the file name is as below
File_name :
FEB_MERC_DATA_??????.txt
Sample inbound file which we got in the month of January "FEB_MERC_DATA_201901.txt"
We have a FTP script which will connect to the target server and search the file with the format and copies the file to our local server . We will run this ftp script from our local server .
Script :
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Issue:
In the month of FEB the client started to send file name in lower case "feb_merc_data_201902.txt" Because of the lower case file naming the "MGET" function is unable to pick the files and not getting copied to our local server as of now for a temporary solution we have changed the configuration to lower case file name .
Does any one have solution regarding the mget function so that it can ignore the case sensitive while copying the file so that even though the client send's either in upper or lower case we should be able to copy the file to target directory.
I have tried by using "-i" in the below ftp script but its throwing error as
mget: Invalid flag -i
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget -i FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Does any one have solution for this ?
Thank you.
shell-script sftp expect
Why is it not the client's responsibility to conform to your standards. Do your clients have the right to assert their individual standards? If you have or acquire more than one client that can quickly become unmanageable so you must insist that the clients comply with your standards. If you have only one client, and do not expect another, then you can change your code to use the lower case.
– Stephen Boston
Feb 17 at 15:56
@StephenBoston Thak's for the response . Yeah but client has confirmed that they are going to send the file either in upper case or lower case they don't follow a proper standard. They have intimated us to change our logic to pull the file either if it's in lower case or upper case .
– Rak kundra
Feb 17 at 16:44
add a comment |
We have a table contains the file name's which are considered as inbound feed every week and one of the file name is as below
File_name :
FEB_MERC_DATA_??????.txt
Sample inbound file which we got in the month of January "FEB_MERC_DATA_201901.txt"
We have a FTP script which will connect to the target server and search the file with the format and copies the file to our local server . We will run this ftp script from our local server .
Script :
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Issue:
In the month of FEB the client started to send file name in lower case "feb_merc_data_201902.txt" Because of the lower case file naming the "MGET" function is unable to pick the files and not getting copied to our local server as of now for a temporary solution we have changed the configuration to lower case file name .
Does any one have solution regarding the mget function so that it can ignore the case sensitive while copying the file so that even though the client send's either in upper or lower case we should be able to copy the file to target directory.
I have tried by using "-i" in the below ftp script but its throwing error as
mget: Invalid flag -i
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget -i FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Does any one have solution for this ?
Thank you.
shell-script sftp expect
We have a table contains the file name's which are considered as inbound feed every week and one of the file name is as below
File_name :
FEB_MERC_DATA_??????.txt
Sample inbound file which we got in the month of January "FEB_MERC_DATA_201901.txt"
We have a FTP script which will connect to the target server and search the file with the format and copies the file to our local server . We will run this ftp script from our local server .
Script :
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Issue:
In the month of FEB the client started to send file name in lower case "feb_merc_data_201902.txt" Because of the lower case file naming the "MGET" function is unable to pick the files and not getting copied to our local server as of now for a temporary solution we have changed the configuration to lower case file name .
Does any one have solution regarding the mget function so that it can ignore the case sensitive while copying the file so that even though the client send's either in upper or lower case we should be able to copy the file to target directory.
I have tried by using "-i" in the below ftp script but its throwing error as
mget: Invalid flag -i
#!/usr/bin/expect
spawn /usr/bin/sftp testing@192.168.1.55
expect "Expecting password:"
send "testingn";
expect "sftp> "
send "lcd /incoming/loadn"
expect "sftp> "
send "cd /home/client-data/prodn"
expect "sftp> "
send "mget -i FEB_MERC_DATA_??????.txtn"
expect "sftp> "
send "byen"
expect eof
Does any one have solution for this ?
Thank you.
shell-script sftp expect
shell-script sftp expect
asked Feb 17 at 15:22
Rak kundraRak kundra
165213
165213
Why is it not the client's responsibility to conform to your standards. Do your clients have the right to assert their individual standards? If you have or acquire more than one client that can quickly become unmanageable so you must insist that the clients comply with your standards. If you have only one client, and do not expect another, then you can change your code to use the lower case.
– Stephen Boston
Feb 17 at 15:56
@StephenBoston Thak's for the response . Yeah but client has confirmed that they are going to send the file either in upper case or lower case they don't follow a proper standard. They have intimated us to change our logic to pull the file either if it's in lower case or upper case .
– Rak kundra
Feb 17 at 16:44
add a comment |
Why is it not the client's responsibility to conform to your standards. Do your clients have the right to assert their individual standards? If you have or acquire more than one client that can quickly become unmanageable so you must insist that the clients comply with your standards. If you have only one client, and do not expect another, then you can change your code to use the lower case.
– Stephen Boston
Feb 17 at 15:56
@StephenBoston Thak's for the response . Yeah but client has confirmed that they are going to send the file either in upper case or lower case they don't follow a proper standard. They have intimated us to change our logic to pull the file either if it's in lower case or upper case .
– Rak kundra
Feb 17 at 16:44
Why is it not the client's responsibility to conform to your standards. Do your clients have the right to assert their individual standards? If you have or acquire more than one client that can quickly become unmanageable so you must insist that the clients comply with your standards. If you have only one client, and do not expect another, then you can change your code to use the lower case.
– Stephen Boston
Feb 17 at 15:56
Why is it not the client's responsibility to conform to your standards. Do your clients have the right to assert their individual standards? If you have or acquire more than one client that can quickly become unmanageable so you must insist that the clients comply with your standards. If you have only one client, and do not expect another, then you can change your code to use the lower case.
– Stephen Boston
Feb 17 at 15:56
@StephenBoston Thak's for the response . Yeah but client has confirmed that they are going to send the file either in upper case or lower case they don't follow a proper standard. They have intimated us to change our logic to pull the file either if it's in lower case or upper case .
– Rak kundra
Feb 17 at 16:44
@StephenBoston Thak's for the response . Yeah but client has confirmed that they are going to send the file either in upper case or lower case they don't follow a proper standard. They have intimated us to change our logic to pull the file either if it's in lower case or upper case .
– Rak kundra
Feb 17 at 16:44
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501179%2ffile-movement-between-servers-that-have-the-same-case-insensitive-filename%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501179%2ffile-movement-between-servers-that-have-the-same-case-insensitive-filename%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why is it not the client's responsibility to conform to your standards. Do your clients have the right to assert their individual standards? If you have or acquire more than one client that can quickly become unmanageable so you must insist that the clients comply with your standards. If you have only one client, and do not expect another, then you can change your code to use the lower case.
– Stephen Boston
Feb 17 at 15:56
@StephenBoston Thak's for the response . Yeah but client has confirmed that they are going to send the file either in upper case or lower case they don't follow a proper standard. They have intimated us to change our logic to pull the file either if it's in lower case or upper case .
– Rak kundra
Feb 17 at 16:44