Search Results

Search: Posts Made By: maruf
12,481
Posted By maruf
Need a Shell Script for FTP
function main_menu()
{
while :
do
echo
clear
echo "------------------------------------------------------------------------------------"
echo ""
echo...
12,481
Posted By maruf
Need a Shell Script for FTP
I've added the script into shell script menu. After run the menu option it not showing any msg but the log files generated properly in specified location also written the error msg to log..But i need...
12,481
Posted By maruf
Need a Shell Script for FTP
NOW=$(date +"%m%d%Y")
FILE="XXXXX.TXT"
#I add below for changing the file name with below format
filename=YYYYL.$(date --date="-1 day" +"%Y%m%d").001
exec > $NOW.log
exec 2>&1

if ! mkdir...
12,481
Posted By maruf
Need a Shell Script for FTP
exec >/tmp/log
exec 2>&1
HOST=''
ftpuser=''
ftppass=''
NOW=$(date +"%m-%d-%Y")
FILE="XXXX.$(date +%y%m%d)"
if ! mkdir /tmp/$$
then
echo "Couldn't create /tmp/$$" >&2
...
12,481
Posted By maruf
Need a Shell Script for FTP
Now the Code look like below


exec >>/tmp/log
exec 2>&1
HOST=''
ftpuser=''
ftppass=''
NOW=$(date +"%m-%d-%Y")
if ! mkdir /tmp/$$
then
echo "Couldn't create /tmp/$$" >&2...
12,481
Posted By maruf
Need a Shell Script for FTP
I ran below

HOST=''
ftpuser=''
ftppass=''
FILE='XXXX.YYMMDD'
NOW=$(date +"%m-%d-%Y")
if ! mkdir /tmp/$$
then
echo "Couldn't create /tmp/$$" >&2
exit 1
fi

echo...
12,481
Posted By maruf
Hi, I am not in ofc now. I will check the...
Hi,

I am not in ofc now. I will check the below tomorrow and revert back by tomorrow.

Thanks
12,481
Posted By maruf
Need a Shell Script for FTP
Hi,

Yes..file kept in linux /tmp/ folder.

---------- Post updated at 08:05 PM ---------- Previous update was at 01:33 PM ----------

Hi,

Any update ?

Thanks

---------- Post updated...
12,481
Posted By maruf
Need a Shell Script for FTP
Hi

I am going to clear you...File generated in windows pc that is remote[format is XXX.yymmdd]..linux pc is local for me...script run in linux pc..
12,481
Posted By maruf
Need a Shell Script for FTP
Hi,

Yes local server[linux]. everyday file is generated like XXXX.yymmdd format but the directory is same.

Thanks
12,481
Posted By maruf
Need a Shell Script for FTP
Hi,

Noted with thanks
Below is the values of the some variables

FILE='XXXX.*' [get multiple file]
SrcDir='D:\TEST\' [Windows PC]
DstDi='/tmp/' [Linux Pc]


Thanks
12,481
Posted By maruf
Need a Shell Script for FTP
Hi Corona,

Now i am getting below

220 Microsoft FTP Service
---> SYST
215 Windows_NT
Remote system type is Windows_NT.
---> USER ftpuser
331 Password required for ftpuser.
---> PASS...
12,481
Posted By maruf
Need a Shell Script for FTP
Hi,

What does this portion do? specially "echo "Couldn't connect" >&2" line

if [ "$?" -ne 0 ]
then
echo "Couldn't connect" >&2
exit
fi


Thanks
12,481
Posted By maruf
Need a Shell Script for FTP
Hi,

I have tried below

HOST=''
ftpuser=''
ftppass=''
FILE='XXXX.*'
SrcDir='G:\KKKK.*'
DstDi='/tmp/'
NOW=$(date +"%m-%d-%Y")
ftp -nvd $HOST << EOF >/tmp/ftp.$NOW.log
quote USER $ftpuser...
12,481
Posted By maruf
Need a Shell Script for FTP
Hi,

Could you please sample script for that? I only know about the simple ftp commands that only bring the file from one server to another. I cant check file size also connection.

Please help....
12,481
Posted By maruf
Need a Shell Script for FTP
Hello Brothers,

I am new in shell script.I need a shell script that will run in Linux Server. Script will connect to windows FTP server before connection script will check the connection from...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 05:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy