Results 1 to 10 of 13

Thread: how to handle strings with spaces

Threaded View

  1. #7
    Join Date
    Jul 2007
    Ubuntu 14.04 Trusty Tahr

    Re: how to handle strings with spaces

    Yeah, I was using sh not bash. I've got it working now so I'll stick with it, what I've got works with both bash and sh. I guess that line means something.
    why would you want to use sh for your own userspace scripts? Do you have a computer from the 20th century that shaving off that 100k of RAM matters? Bash offers tons of nifty stuff that is not accessible in sh (dash)
    You are gimping yourself for no reason. If you have cool features within your arms reach, use them, don't reinvent the wheel with hackish workarounds for the sake of it. These features were in fact implemented to alleviate many of such basic problems like this one.

    bash <( cmd ) that means 'capture the cmd output and make a fake file of it' is incredibly powerful, it works everywhere you would use files as input. some_command file? have some_command <( cmd ) instead. You don't pollute your hdd with temporary dump files and can cut to the chase.
    Last edited by Vaphell; March 25th, 2013 at 11:49 PM.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts