• mcguire (unregistered) in reply to tufty
    tufty:
    ...I think not...


    And, *poof*, he disappeared.

    Whoops, sorry.  I'm in the wrong joke.
  • (cs) in reply to kipthegreat
    kipthegreat:
    As an aside, I've wanted for a long time to parse the filenames of my mp3's in order to set all the id3v2 tags.  I've got a Perl script that does the parsing quite well, but I really need some kind of command program that will let me set the tags with input parameters, and I haven't been able to find one.  Anyone know of such a program?  Just thought I'd try..

    Heh - under Linux there's a command-line tool called id3tag (part of libid3, apparently) that does that, but I'm not sure how easily you could get it working under Windows...

  • Yksi pieni mieli (unregistered) in reply to makomk

    If the thing is formatted with UDF, it could simply be in the middle of the formatting. It takes nearly an hour to format a CD-RW with UDF, and while the process is running, free space slowly creeps from 0 towards the final value. You can add a file as soon as there's enough free space for it.

    It's been years when I last used DirectCD, so I can't say for sure, but if the capacity shown is the total number of bytes the disk can contain at the end of the process, it would explain this thing.

  • (cs) in reply to cowboy_k
    cowboy_k:
    Anonymous:
    locate -i bakery | perl -pe 's/\n/\0/g' | xargs -0 xmms


    If all you're doing with perl is a regexp replace, you could probably replace that with a sed call instead -  less overhead than the perl interpreter...

    what, me, pedantic?


    Alternately, since the use of -i suggests that this is GNU locate anyway, then

    locate -0 -i bakery | xargs -0 xmms

    will do the trick... No need for the perl call, locate is willing to spit out null-terminated strings... As a bonus, this way automatically handles filenames which have newlines too...


  • (cs) in reply to McBruce
    McBruce:
    Actually, in linux once I somehow created a filename beginning with the '-' character. That was fun trying to get rid of it, as it kept thinking the filename was an argument to rm.


    There are plenty of ways to create such a file, as many programs don't respect the whole "- is stdout" idiom... Still, the first time I did this, it took me a whole ten seconds to realise that ./- is unambiguously a filename, and refers to that file which cat doesn't want to know about... (when I did it, I wanted to see what was in the file... I was redirecting some output from somewhere to stdout, and it ended up in that file instead... "cat -" echoes stdin, but "cat ./-" works just fine... same for "rm ./-".)
  • (cs) in reply to McBruce
    Anonymous:
    Actually, in linux once I somehow created a filename beginning with the '-' character. That was fun trying to get rid of it, as it kept thinking the filename was an argument to rm.


    Especially fun if the filename is -rf.
    (Spoiler: rm -- -rf)
  • Erik Siers (unregistered)
    Alex Papadimoulis:
    as Kyle Trauberman noticed

    Heh. Nice to see someone in my family getting their 15 minutes.

  • Erik Siers (unregistered) in reply to Erik Siers

    Argh. Nice to see the forum software messing up, too.

  • Wonko the Sane (unregistered) in reply to tiller

    tiller:
    Anonymous:
    locate -i bakery | perl -pe 's/\n/\0/g' | xargs -0 xmms


    Wow, that's interesting use of perl and xargs, but it is working, so thanks :}


     

    locate -i bakery|tr \\n \\0 | xargs -0 xmms

    Not every task requires perl...
     

Leave a comment on “Pop-up Potpourri: Tax Time Edition”

Log In or post as a guest

Replying to comment #:

« Return to Article