unix - shell script using ncftpls in linux -


i using shell script fetch latest files windows server. doing using following command:

ncftpls -m -u myusername -p mypass ftp://abc.com/folder \   | sort +1 -2 --field-separator=\; \   | tail -n1 | cut -d';' -f4 | sed 's/ //g' 

now trying run same script fetch files linux server. modified script this:

ncftpls -m -u myusername -p mypass ftp://abc.com/folder \   | sort +1 -1 --field-separator=\; \   | tail -n1 | cut -d';' -f8 | sed 's/ //g' 

but failing. on unix server listing 2 folders . , ... think folders causing issue, want list files in folder without . , .. folders.

any please.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -