You can use cat command as follows:
The following will find every text file in directory:
cd /dest/dir
cat *.txt > /tmp/output.txt
# now send file using lftp ftp client
lftp -u username,password -e "cd /some/ftp/dir; put /tmp/output.txt; quit;" ftp.nixcraft.in
find /dest/dir -name "*.txt" -print | xargs cat >> /tmp/output1.txt
# now send file using lftp ftp client
lftp -u username,password -e "cd /some/ftp/dir; put /tmp/output.txt; quit;" ftp.nixcraft.in
No comments:
Post a Comment