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 online now Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 23 February 2017, 4:33 AM EST
Location: Aachen, Germany
Posts: 10,318
Thanks: 242
Thanked 3,147 Times in 2,912 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: 22 February 2017, 5:48 PM EST
Location: Saskatchewan
Posts: 21,928
Thanks: 1,050
Thanked 4,095 Times in 3,794 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: 22 February 2017, 5:48 PM EST
Location: Saskatchewan
Posts: 21,928
Thanks: 1,050
Thanked 4,095 Times in 3,794 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 10:17 PM
Nested for loops jacksolm Shell Programming and Scripting 13 08-12-2011 11:37 AM
KSH nested loops? mrice Shell Programming and Scripting 9 07-26-2011 09:17 PM
Korn Shell programming (FTP, LOOPS, GREP) jonesdk5 Shell Programming and Scripting 2 02-10-2010 03:51 PM
nested for loops taiL Shell Programming and Scripting 5 10-01-2009 12:02 AM



All times are GMT -4. The time now is 05:40 AM.