Unix/Linux Go Back    


Homework & Coursework Questions Students must use and complete the template provided. If you don't, your post may be deleted! Special homework rules apply here.

Alternative solution to nested loops in shell programming

Homework & Coursework Questions


Closed    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 09-22-2015
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 21 September 2017, 4:17 AM EDT
Location: Aachen, Germany
Posts: 11,361
Thanks: 297
Thanked 3,522 Times in 3,241 Posts
How about answering my questions?
Sponsored Links
    #9  
Old Unix and Linux 09-22-2015
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 20 September 2017, 6:47 PM EDT
Location: Saskatchewan
Posts: 22,397
Thanks: 1,126
Thanked 4,231 Times in 3,912 Posts
Quote:
Originally Posted by Sandeep Pattnai View Post
As per your suggestion, I have changed the tr -d with the "sed" to remove spaces.
I did not suggest that.

That's going to be the same or worse.

Try a shell builtin.
Sponsored Links
    #10  
Old Unix and Linux 09-22-2015
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 20 September 2017, 6:47 PM EDT
Location: Saskatchewan
Posts: 22,397
Thanks: 1,126
Thanked 4,231 Times in 3,912 Posts

Code:
$ VAR="value with spaces"
$ echo ${VAR// }

valuewithspaces

$

Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
two while nested loops SkySmart Shell Programming and Scripting 3 08-23-2012 09:17 PM
Nested for loops jacksolm Shell Programming and Scripting 13 08-12-2011 10:37 AM
KSH nested loops? mrice Shell Programming and Scripting 9 07-26-2011 08:17 PM
Korn Shell programming (FTP, LOOPS, GREP) jonesdk5 Shell Programming and Scripting 2 02-10-2010 02:51 PM
nested for loops taiL Shell Programming and Scripting 5 09-30-2009 11:02 PM



All times are GMT -4. The time now is 04:51 AM.