• xthexder@l.sw0.com
    link
    fedilink
    arrow-up
    58
    ·
    3 months ago

    I once accidentally created a file with a newline character in it… it was pretty tricky to fix from command line.

    • lad@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      3 months ago

      I created a file with backspace in name, it was hard to understand why filename doesn’t match

    • toynbee@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      3 months ago

      I don’t conduct interviews very often, but when I do, one of my questions is always about interacting with files that have special characters in the filename.

    • Warl0k3@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      3 months ago

      Did you not just use tab? That’s the usual method of dealing with weird characters in filenames that I’ve found

      • xthexder@l.sw0.com
        link
        fedilink
        arrow-up
        4
        ·
        3 months ago

        This was quite a while ago now, but I don’t think my shell escaped the tab complete properly, I remember it just printing a literal newline and evaluating it as a second command. I think there was other unicode in there too, otherwise I would have just typed it out. I had to do something with null terminated output and piping it in to mv, but I can’t remember what exactly.

      • Hupf@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        Too bad when there’s multiple files starting with and consisting mostly of e.g. kanji (when on a Latin keyboard).