LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 06:47 AM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431
Blog Entries: 32

Rep: Reputation: 3
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, 06:58 AM   #2
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431

Original Poster
Blog Entries: 32

Rep: Reputation: 3
OUT=$(echo $OUT | tr "\n" " ")
 
  


Reply



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 05:40 AM
ftp - check if file on remote exists (skip overriding) spiriad Linux - Newbie 5 07-29-2010 05:42 AM
how to skip 5 lines notoriouskingpin Linux - Newbie 2 03-12-2009 01:09 PM
FTP clients that skip passive IP addresses Harry Seldon Linux - General 0 07-26-2007 10:41 AM
output number of blank lines tjgadu Linux - Newbie 7 06-09-2005 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 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
Open Source Consulting | Domain Registration