What you have posted as material for troubleshooting is very ambiguous and your confirmation that tempFDMEE.csv exists doesn't help, since you did not post any result or output that really confirms it.
That said, here some tips that you may choose to put in practice.
Add set -xv somewhere in the beginning of the script to help you debug
Redirecting the stdout to oblivion doesn't very robust. Is there a possibility that the output is the content of the download? Who knows?
./epmauthomate.sh should send information and status of the running of program, including warnings and errors to stderr. In that way you may be able to ignore it if you choose it as 2> /dev/null
Concerning:
Code:
if [ "$_RVAL" -eq "0" ]
The return of the previous command with a zero, in this case is not a guarantee the veracity of the echo statement:
Code:
echo "Successful : Download Data File"
Depending how it was written ./epmauthomate.sh could and will return a zero even when the result was not a successful download but rather a clean exist.
Perhaps something like this would be more ensuring
Code:
if [ "$_RVAL" -eq "0" ] && [ -e "${_TEMPFILE}" ]
Code:
then
echo && echo "Successful : Download Data File"
else
echo && echo "Failed : Download Data File"
fi
The && is superfluous or without purpose.
Consider this:
Code:
then
echo
echo "Successful : Download Data File"
else
echo
echo "Failed : Download Data File"
What's the problem with this?
Code:
mv "${_TEMPFILE}" "${_INBOXPATH}${_FILE}"
As shown, it does regardless if the file exist or was downloaded successfully, despise of the claim to the contrary.
Thank you for your help!
I've updted the code per your reccomendations and it's working as expected. The original issues was a pathing error - my fault. But your suggestions were applicable and best practice so I added them.
The "#" was just to comment out that line so it wouldn't fire while I debugged.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Look at the following data file(cou.data) which has four fields separated by tab.
Four fields are country name, land area, population, continent where it belongs.
As for country name or continent name which has two words, two words are separated by space.
(Data are not accurately... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing To e-mail address
and column 3 contains cc e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi All,
I have just now started learning awk from the source - Awk - A Tutorial and Introduction - by Bruce Barnett
and the bad part is that I am stuck on the very first example for running the awk script.
The script is as -
#!/bin/sh
# Linux users have to change $8 to $9
awk '
BEGIN ... (6 Replies)
I've posted about this before, but only recently narrowed the problem down to a specific cause.
Ok, first of all, the behavior:
It occurs when autocompletion brings up its list (not when there is only a single option). Basically, if I were to type, say,
cd ~/<TAB>
I would get something... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
we're seeing very strange "No such file or directory" errors on NFS volumes on one of our suse servers - can anyone please help?
we're seeing it for both our NetApp NAS Device and one of our Solaris NFS servers too
Here is what we're seeing:
stg-backup:~ # cd /rmt/sge
stg-backup:/rmt/sge... (3 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
I have a problem using bash. Simply, I cannot find the right command (if there's one!) to enter in the "- Arch_02 -" directory. As you can see, the name begins with a hyphen and this is causing some trouble:
localhost arch2 # pwd
/mnt/arch2
localhost arch2 # ls -l
total 4
dr-x------ 1 root... (3 Replies)