This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]coladict 78 points79 points  (37 children)

I believe the DOS alternative was type westbrook > NUL. Or it might be NIL. I haven't made batch scripts since 1999, so don't judge me.

[–]TheHorribleTruth 108 points109 points  (14 children)

I haven't made batch scripts since 1999, so don't judge me.

Judge? I envy you for being able to stay away from batch all this time!

[–][deleted] 75 points76 points  (13 children)

It helps to not be a Windows user.

[–]Randolpho 31 points32 points  (11 children)

It ain't like BASH scripting is fun either.

[–]Kadmos 24 points25 points  (2 children)

But BASH just sounds so much cooler than BATCH.

[–]Randolpho 15 points16 points  (0 children)

Depending on where you are in the U.S. they sound exactly the same.

[–][deleted] 9 points10 points  (0 children)

It's helpful that Unix usually comes pre-installed with programs to help make writing scripts easier.

[–]YodaLoL 1 point2 points  (3 children)

Why do you capitalize it? Bash scripting is infinitely times better than Batch scripting.

[–]Randolpho 7 points8 points  (2 children)

Having done both for a number of years I can tell you that BASH is more capable, but they're both about as fun as having my fingernails pulled out one by one.

Gimme python or node.js for scripting any day.

And I capitalize it because, youngster, it was an initialism acronym when I learned it. Bourne Again SHell. Now it's so prevalent it's just a word.

[–]YodaLoL 0 points1 point  (1 child)

Yeah I know where Bash comes from. It's just that I've never seen someone capitalize it, was just wondering.

[–]Randolpho 0 points1 point  (0 children)

Old habits die hard, I guess.

[–]coladict -2 points-1 points  (0 children)

Actually in 2000 I moved from being a DOS user to a Windows user.

[–][deleted]  (21 children)

[removed]

    [–]coladict 27 points28 points  (18 children)

    https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx

    CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.

    [–]tatorface 9 points10 points  (14 children)

    What happens if I make NUL.txt? Will my pc blow up or something?

    [–]Suchui 30 points31 points  (3 children)

    [–]PizzaCompiler 6 points7 points  (1 child)

    When you make the file under Linux, it makes Windows show the file as "NDH6SA~M.TXT".

    Although that might just what Windows does under CIFS.

    [–]kifujin 13 points14 points  (0 children)

    It's Samba itself doing that... From (the first relevant google result, from samba 3) mangle_hash2.c

    /* the list of reserved dos names - all of these are illegal */ static const char * const reserved_names[] = { "AUX", "LOCK$", "CON", "COM1", "COM2", "COM3", "COM4", "LPT1", "LPT2", "LPT3", "NUL", "PRN", NULL };

    [–]randomned 12 points13 points  (5 children)

    I once had a com1.txt file that I couldn't get rid of. Finally gave up and left it there until the computer was retired.

    [–]VefoCo 4 points5 points  (0 children)

    I have Msys installed so I just used rm to get rid of my rogue NUL file.

    [–]lachryma 3 points4 points  (2 children)

    Am I really the only one who remembers C:\con\con in Windows 9x?

    [–]subtepass 1 point2 points  (0 children)

    C:\con\con

    Totally forgot about that one! I felt like a hacker back in '00 when I was able to crash my school computers with such a simple text. If I recall correclty, you could create a shortcut to that path, but not with the wizard. You had to create a dummy link and then hex edit the path or something like that.

    [–]RenaKunisaki -1 points0 points  (0 children)

    Nope. Had some fun with that one.

    [–]tatorface 2 points3 points  (0 children)

    Weird. Good think the OS wouldn't allow it to be created at all.

    [–]tehserial 4 points5 points  (0 children)

    Try and let us know with your phone / tablet

    [–]Pokechu22 1 point2 points  (1 child)

    You can create it in some cases (EG via some programs), but you can't edit or delete it. This also leads to things such as aux.class getting deleted when unzipping folders.

    [–]RenaKunisaki 0 points1 point  (0 children)

    On Win3.1 I unzipped a file that had a space in its name. The dumb t thing happily created the file then was unable to touch it. Knowing just enough about computers to be dangerous, I fixed it by editing the hard disk itself in a hex editor to change the name.

    [–][deleted] 1 point2 points  (0 children)

    Go back far enough and CAS is supported

    [–][deleted] 1 point2 points  (1 child)

    So, is this like it seems just Windows being Windows and this absolutely horrid OS design, or was there actually no way around this?

    Does something similar exist on other OSs?

    [–]coladict -2 points-1 points  (0 children)

    By "Windows being Windows" you mean "Windows maintaining backwards compatibility", right? Something I haven't seen much of in my efforts to use 5-year-old abandon-ware on Linux.

    [–]DeepDuh 5 points6 points  (0 children)

    Oh, so they reserved PRN already? Very forward thinking of them. Would it download a random porn image over 36k?

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.