Register
It is currently Thu Jul 24, 2014 6:17 am

+= not working


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Wed May 12, 2010 10:18 pm   

Joined: Wed Nov 26, 2008 7:43 pm
Posts: 50
Location: Texas
Hi everyone,

I'm getting this error every time I try to
use += for a command. Is there another
way to write this so that it doesn't give
me errors, or why is it working on one bash
shell and not in another.

LINE+=`echo -e "$SIZE\t"`
LINE+=: command not found

Ted


Top
 Profile  
 PostPosted: Thu May 13, 2010 1:35 am   

Joined: Wed Apr 14, 2010 10:23 am
Posts: 17
Which Bash version?


Top
 Profile WWW  
 PostPosted: Fri May 14, 2010 3:57 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
one may be able to use the following instead;

Code:
LINE="${LINE}$(echo -e \"$SIZE\t\")"


It's likely not working in some bash shells 'cos it's a relatively new feature.


Top
 Profile  
 PostPosted: Sat May 15, 2010 3:09 pm   

Joined: Wed Apr 14, 2010 10:23 am
Posts: 17
3.1-alpha1 IIRC. Round about '05 or '06?


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP