sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    I was bitten in the hiney by *nix

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 700 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      todd burch
      last edited by

      I wrote a ruby script in TextWrangler (on a Mac) and saved it (OK, I've written dozens, maybe hundreds...πŸ˜„ ). Howevber, this time, I inadvertently hit the space bar after the ".rb" and saved it. Then, not realizing a blank got added to the name, I attempted to load it and it could not be found. After messing with it, I realized the blank was saved as the third character after the "b" in .rb.

      Entering load 'myscript.rb' failed, while entering load 'myscript.rb ' worked! Fat thumbs beware! Leading and trailing blanks are significant on *nix system. Only took me 10 minutes to figure it out.

      Who would have thunk.

      Todd

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        That's a good one! I would argue that the software should have trimmed the trailing whitespace - after all, who in there right mind names a file with a trailing space?

        One thing I've done is manage to create files with names like "-v" and other silly things, so when I typed rm -v, rm thinks the filename was an option! There is an option on the Gnu version of rm to get around this.

        What flavor of unix is Mac based on?

        Hi

        1 Reply Last reply Reply Quote 0
        • T Offline
          todd burch
          last edited by

          FreeBSD I believe.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement