Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-18-2014, 01:42 PM   #1
LQ Newbie
Registered: Jun 2013
Posts: 29

Rep: Reputation: Disabled
xargs output with more space


cat input | xargs
1 2 3 4

but I want output with more space between the numbers. Like..
1 2 3 4

How to do?
Old 04-19-2014, 08:51 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,853

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
echo $input
1 2 3 4
for i in $input ; do echo -n "   "$i ; done ; echo ""
   1   2   3   4


bash script $@, bash scripting, shell script, shell scripting

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
xargs: unmatched single quote; by default quotes are special to xargs unless you use Raakh5 Linux - Newbie 7 05-21-2014 08:26 PM
find . -mtime +1 | xargs ls -ltr, giving different output on same OS hamijami Linux - General 1 09-25-2013 11:42 AM
[SOLVED] Xargs with output of find thund3rstruck Programming 6 07-17-2011 09:26 AM
grep | xargs -I echo $(foo; bar; echo $(fee; fi; fo; fum)) == questionable output.. GrapefruiTgirl Programming 11 12-07-2010 08:02 PM
When I use xargs with echo, why does the output contain an extra space? web_janitor Linux - General 2 08-20-2009 05:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:46 PM.

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