LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2011, 07:47 AM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Rep: Reputation: 2
FTP output, dont skip lines


Code:
OUT="$(ftp -n $REMOTESERVER 2>&1 <<FTP
quote USER $LOGIN
quote PASS $PASSWORD
nlist $REMOTEPATH
bye
FTP
)"
echo $OUT
the output becomes something like
Code:
.
..
file1.ext
file2.ext
file3.ext
I dont know why it skips lines, but when I try to replace the lines with sed, \r or \n, it doesnt make any difference, has anyone encountered this problem before?
Thanks,
Ted
 
Old 04-02-2011, 07:58 AM   #2
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Original Poster
Rep: Reputation: 2
OUT=$(echo $OUT | tr "\n" " ")
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to remove X lines from output hurryi Linux - Newbie 5 10-11-2010 06:40 AM
ftp - check if file on remote exists (skip overriding) spiriad Linux - Newbie 5 07-29-2010 06:42 AM
how to skip 5 lines notoriouskingpin Linux - Newbie 2 03-12-2009 02:09 PM
FTP clients that skip passive IP addresses Harry Seldon Linux - General 0 07-26-2007 11:41 AM
output number of blank lines tjgadu Linux - Newbie 7 06-09-2005 05:01 PM


All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration