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: 23 March 2017, 4:19 PM EDT
Location: Aachen, Germany
Posts: 10,514
Thanks: 255
Thanked 3,219 Times in 2,968 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: 23 March 2017, 1:50 PM EDT
Location: Saskatchewan
Posts: 21,996
Thanks: 1,061
Thanked 4,125 Times in 3,817 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: 23 March 2017, 1:50 PM EDT
Location: Saskatchewan
Posts: 21,996
Thanks: 1,061
Thanked 4,125 Times in 3,817 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:19 PM.