The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Why generate "ash and bash" different output for same bash script? s. murat Shell Programming and Scripting 0 05-26-2008 07:19 AM
Processing extended ascii character file names in UNIX (BASH scipts) peli UNIX for Advanced & Expert Users 9 04-06-2008 05:17 PM
bash:awk output into an array phamp008 Shell Programming and Scripting 2 03-16-2008 05:14 AM
Bash multiple output redirection yoi2hot4ya Shell Programming and Scripting 2 05-31-2005 12:52 PM
Disk Formated with NTFS bache_gowda SuSE 4 11-19-2003 05:05 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-23-2008
sweede sweede is offline
Registered User
  
 

Join Date: May 2008
Posts: 2
processing tab-formated output of command w/bash

I have a command that when ran it will have an output such as

string LongerString
string2 longerString2
More MoreStrings

seperated by tabs. The command lists domains and their accounts set up in my server admin software (interworx).

The end result will be that it will run rsync for each of the domain accounts.

For example.

rsync -a /home/account/domain/html {backupserver}:~/backup/domain/html

if i try something like
for domain in `/home/interworx/bin/listaccounts.pex`
do
echo $domain
done;

it just prints out each word on its own line.

i've tried different forms of
while read line;
do
echo "${line}"
done < script_command and it always returns something like

./test.sh: line 4: xxxxxo xxxxxxxxxx.com
lxxxxn xxxxxxx.net
unxxxxxxe xxxxx.net: No such file or directory




Any ideas ?
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0