copy list of arguments

This is a discussion on copy list of arguments within the Linux Programming forums, part of the Platform Specific Boards category; Hi. I am trying to copy a list of arguments that are separated by spaces and follow a specific flag ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    39

    copy list of arguments

    Hi. I am trying to copy a list of arguments that are separated by spaces and follow a specific flag (eg -l) to a string. How can I achieve that in bash? Thanks in advance.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,624
    If I get it right, you want multiple words to be passed as a single argument to a program. This can be achieved by enclosing them in double( and single? ) quotes.
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 05-08-2011, 12:14 PM
  2. List copy semantics efficiency
    By dudeomanodude in forum C++ Programming
    Replies: 31
    Last Post: 05-24-2008, 05:05 PM
  3. How to copy nodes in linked list
    By dwlu244 in forum C Programming
    Replies: 9
    Last Post: 11-01-2006, 05:35 AM
  4. copy array to linked list
    By mag_chan in forum C Programming
    Replies: 3
    Last Post: 10-24-2005, 09:58 PM
  5. linked list copy constructor
    By brianptodd in forum C++ Programming
    Replies: 3
    Last Post: 04-15-2003, 11:45 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21