Results 1 to 8 of 8

Thread: bash syntax, space in path command

Threaded View

  1. #1
    Join Date
    Mar 2012
    Beans
    11

    bash syntax, space in path command

    Code:
    $ pwd
    $ ~/pathwith space
    
    $ if [ $(pwd) = ~/pathwith space ]; then echo "true"; fi
    $ bash: [: too many arguments
    What is wrong? I've tried escaping the space and quotes around the path.
    Last edited by sselt; March 19th, 2013 at 08:55 AM.

Bookmarks

Posting Permissions

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