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: 29 June 2017, 5:00 AM EDT
Location: Aachen, Germany
Posts: 10,976
Thanks: 280
Thanked 3,379 Times in 3,110 Posts
How about answering my questions?
Sponsored Links
    #9  
Old Unix and Linux 09-22-2015
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 29 June 2017, 11:59 AM EDT
Location: Saskatchewan
Posts: 22,264
Thanks: 1,108
Thanked 4,201 Times in 3,886 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 online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 29 June 2017, 11:59 AM EDT
Location: Saskatchewan
Posts: 22,264
Thanks: 1,108
Thanked 4,201 Times in 3,886 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 12:06 PM.