Loading ...
Sorry, an error occurred while loading the content.

RE: [jasspa] memacros.tar.gz -- file "null"

Expand Messages
  • Steven Phillips
    Why is windows so c**p? Why is NULL a reserved file name? How bizarre. The NULL file is used by any command which use grep, rgrep, replace-all-strings etc. The
    Message 1 of 7 , Aug 20, 2001
    • 0 Attachment
      Why is windows so c**p? Why is NULL a reserved file name? How bizarre.

      The NULL file is used by any command which use grep, rgrep,
      replace-all-strings etc. The problem with grep is that if you do:

      grep -n foo file1 file2

      you get lines like

      file1:23: .....foo.....

      everything works well, but if you run:

      grep -n file1

      you get:

      23: .....foo.....

      The file name is dropped because only one file was given. Therefore always
      give 2 file names. On unix thats easy, give "/dev/null" but on windows....
      enough said!

      Steve

      > -----Original Message-----
      > From: Thomas Hundt [mailto:thundt@...]
      > Sent: Tuesday, August 21, 2001 4:15 AM
      > To: JASSPA MicroEmacs Mailing List
      > Subject: [jasspa] memacros.tar.gz -- file "null"
      >
      >
      > Going through the latest upgrades :-)
      >
      > There is always this file "null" in this archive -- it screws up
      > copying in WinZip because "null" is a reserved word in Windows...
      > You might want to remove it (unless it has a purpose?).
      >
      > -Th
      >
      > __________
      > Thomas Hundt <thundt@...> +1-415-643-3595 [http://hundt.com]
      >
      >
      >
      >
      > __________________________________________________________________________
      >
      >
      >
      > This is an unmoderated list. JASSPA is not responsible for the content of
      >
      > any material posted to this list.
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    • Steven Phillips
      What would be a sensible file name to use? i.e. if we renamed null to devnull or empty would this avoid any problems?? Steve ...
      Message 2 of 7 , Aug 21, 2001
      • 0 Attachment
        What would be a sensible file name to use? i.e. if we renamed null to
        devnull or empty would this avoid any problems??

        Steve

        > -----Original Message-----
        > From: Jirko Cassuben [mailto:jirko@...]
        > Sent: Tuesday, August 21, 2001 2:26 PM
        > To: jasspa@yahoogroups.com
        > Subject: Re: RE: [jasspa] memacros.tar.gz -- file "null"
        >
        >
        > AFAIK NULL is a perfectly valid DOS filename. The reserved word is NUL.
        > Therefore
        >
        > dir >null
        > type null
        >
        > shows the contents of the directory.
        >
        > Also this little c prog:
        >
        > #include <stdio.h>
        > main()
        > {
        > FILE *f;
        > f=fopen("null","w");
        > fputs("foo\nbar",f);
        > }
        >
        >
        > correctly creates a file "null" containing the words foo and bar.
        >
        > Not that I want to defend MS (their software and OSs suck) but in
        > this case
        > I'd consider WinZip broken and not DOS and it's relatives.
        >
        > And not that this helps much because a lot of people out there are using
        > Windows and WinZip instead of a decent OS (or at least cygwin)
        > and tar/gzip
        >
        > BTW. Try
        >
        > grep -n foo file1 nul:
        >
        > under DOS. This works at least with W2K's cmd. (Ooops, I guess
        > sometimes I have to use MS OSs myself...)
        >
        > Jirko
        >
        >
        > >
        > > From: Steven Phillips <sphillips@...>
        > > To: jasspa@yahoogroups.com
        > > Subject: RE: [jasspa] memacros.tar.gz -- file "null"
        > >
        > > Why is windows so c**p? Why is NULL a reserved file name? How bizarre.
        > >
        > > The NULL file is used by any command which use grep, rgrep,
        > > replace-all-strings etc. The problem with grep is that if you do:
        > >
        > > grep -n foo file1 file2
        > >
        > > you get lines like
        > >
        > > file1:23: .....foo.....
        > >
        > > everything works well, but if you run:
        > >
        > > grep -n file1
        > >
        > > you get:
        > >
        > > 23: .....foo.....
        > >
        > > The file name is dropped because only one file was given.
        > Therefore always
        > > give 2 file names. On unix thats easy, give "/dev/null" but on
        > windows....
        > > enough said!
        > >
        > > Steve
        > >
        > > > -----Original Message-----
        > > > From: Thomas Hundt [mailto:thundt@...]
        > > > Sent: Tuesday, August 21, 2001 4:15 AM
        > > > To: JASSPA MicroEmacs Mailing List
        > > > Subject: [jasspa] memacros.tar.gz -- file "null"
        > > >
        > > >
        > > > Going through the latest upgrades :-)
        > > >
        > > > There is always this file "null" in this archive -- it screws up
        > > > copying in WinZip because "null" is a reserved word in Windows...
        > > > You might want to remove it (unless it has a purpose?).
        > > >
        > > > -Th
        > > >
        > > > __________
        > > > Thomas Hundt <thundt@...> +1-415-643-3595 [http://hundt.com]
        > > >
        > > >
        > > >
        > > >
        > > >
        > __________________________________________________________________________
        > > >
        > > >
        > > >
        > > > This is an unmoderated list. JASSPA is not responsible for
        > the content of
        > > >
        > > > any material posted to this list.
        > > >
        > > >
        > > >
        > > >
        > > > Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
        > >
        > >
        > >
        >
        >
        >
        > __________________________________________________________________________
        >
        >
        >
        > This is an unmoderated list. JASSPA is not responsible for the content of
        >
        > any material posted to this list.
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        > --------------End of forwarded message-------------------------
        >
        > ----------------------------------
        > E-Mail: jirko@...
        > Date: 21-Aug-2001
        > Time: 11:48:55
        >
        > This message was sent by XFMail
        > ----------------------------------
        >




        __________________________________________________________________________



        This is an unmoderated list. JASSPA is not responsible for the content of

        any material posted to this list.




        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      • Jirko Cassuben
        AFAIK NULL is a perfectly valid DOS filename. The reserved word is NUL. Therefore dir null type null shows the contents of the directory. Also this little c
        Message 3 of 7 , Aug 21, 2001
        • 0 Attachment
          AFAIK NULL is a perfectly valid DOS filename. The reserved word is NUL.
          Therefore

          dir >null
          type null

          shows the contents of the directory.

          Also this little c prog:

          #include <stdio.h>
          main()
          {
          FILE *f;
          f=fopen("null","w");
          fputs("foo\nbar",f);
          }


          correctly creates a file "null" containing the words foo and bar.

          Not that I want to defend MS (their software and OSs suck) but in this case
          I'd consider WinZip broken and not DOS and it's relatives.

          And not that this helps much because a lot of people out there are using
          Windows and WinZip instead of a decent OS (or at least cygwin) and tar/gzip

          BTW. Try

          grep -n foo file1 nul:

          under DOS. This works at least with W2K's cmd. (Ooops, I guess
          sometimes I have to use MS OSs myself...)

          Jirko


          >
          > From: Steven Phillips <sphillips@...>
          > To: jasspa@yahoogroups.com
          > Subject: RE: [jasspa] memacros.tar.gz -- file "null"
          >
          > Why is windows so c**p? Why is NULL a reserved file name? How bizarre.
          >
          > The NULL file is used by any command which use grep, rgrep,
          > replace-all-strings etc. The problem with grep is that if you do:
          >
          > grep -n foo file1 file2
          >
          > you get lines like
          >
          > file1:23: .....foo.....
          >
          > everything works well, but if you run:
          >
          > grep -n file1
          >
          > you get:
          >
          > 23: .....foo.....
          >
          > The file name is dropped because only one file was given. Therefore always
          > give 2 file names. On unix thats easy, give "/dev/null" but on windows....
          > enough said!
          >
          > Steve
          >
          > > -----Original Message-----
          > > From: Thomas Hundt [mailto:thundt@...]
          > > Sent: Tuesday, August 21, 2001 4:15 AM
          > > To: JASSPA MicroEmacs Mailing List
          > > Subject: [jasspa] memacros.tar.gz -- file "null"
          > >
          > >
          > > Going through the latest upgrades :-)
          > >
          > > There is always this file "null" in this archive -- it screws up
          > > copying in WinZip because "null" is a reserved word in Windows...
          > > You might want to remove it (unless it has a purpose?).
          > >
          > > -Th
          > >
          > > __________
          > > Thomas Hundt <thundt@...> +1-415-643-3595 [http://hundt.com]
          > >
          > >
          > >
          > >
          > > __________________________________________________________________________
          > >
          > >
          > >
          > > This is an unmoderated list. JASSPA is not responsible for the content of
          > >
          > > any material posted to this list.
          > >
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          > >
          > >
          > >
          >
          >
          >
          > __________________________________________________________________________
          >
          >
          >
          > This is an unmoderated list. JASSPA is not responsible for the content of
          >
          > any material posted to this list.
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          > --------------End of forwarded message-------------------------
          >
          > ----------------------------------
          > E-Mail: jirko@...
          > Date: 21-Aug-2001
          > Time: 11:48:55
          >
          > This message was sent by XFMail
          > ----------------------------------
          >
        • Jon Green
          The memacros.zip was actually packed and unpacked with WinZip (V8) so I m not sure what the problem is here (original zip archieve shipped from a UNIX box
          Message 4 of 7 , Aug 21, 2001
          • 0 Attachment
            The memacros.zip was actually packed and unpacked with WinZip (V8)
            so I'm not sure what the problem is here (original zip archieve
            shipped from a UNIX box using the zip(1) utility). I've never
            seen a problem with WinZip and a file called "null".

            In addition, the tar.gz would also appear to be handled correctly
            by WinZip V8.0 ??

            I assume that this is the winzip.com version of WinZip and
            not something else going by the same name ??

            Jon.

            Thomas Hundt wrote:
            >
            > Going through the latest upgrades :-)
            >
            > There is always this file "null" in this archive -- it screws up copying in WinZip because "null" is a reserved word in Windows... You might want to remove it (unless it has a purpose?).
            >
            > -Th
            >
            --
          • jirko@cassuben.net
            Hi. I think Jon is right and WinZip handles the null file correctly, I tested that at work today. So it seems that T. Hundts system has a local problem
            Message 5 of 7 , Aug 21, 2001
            • 0 Attachment
              Hi.

              I think Jon is right and WinZip handles the "null" file correctly, I tested
              that at work today. So it seems that T. Hundts system has a local problem
              there. Anyway an empty file, as the "null" one, might give DOS/Windows systems
              some problems, for example you cannot use copy to copy them. So probably you
              can try setting %tool-null-file to "nul:" instead of the "null" file in
              tools.emf (and anywhere else if necessary) that should work for Windows/DOS the
              way /dev/null does for unices. I'll test that tomorrow and tell you if it works.

              Jirko


              On 21-Aug-2001 Steven Phillips wrote:
              > What would be a sensible file name to use? i.e. if we renamed null to
              > devnull or empty would this avoid any problems??
              >
              > Steve
              >
              >> -----Original Message-----
              >> From: Jirko Cassuben [mailto:jirko@...]
              >> Sent: Tuesday, August 21, 2001 2:26 PM
              >> To: jasspa@yahoogroups.com
              >> Subject: Re: RE: [jasspa] memacros.tar.gz -- file "null"
              >>
              >>
              >> AFAIK NULL is a perfectly valid DOS filename. The reserved word is NUL.
              >> Therefore
              >>
              >> dir >null
              >> type null
              >>
              >> shows the contents of the directory.
              >>
              >> Also this little c prog:
              >>
              >> #include <stdio.h>
              >> main()
              >> {
              >> FILE *f;
              >> f=fopen("null","w");
              >> fputs("foo\nbar",f);
              >> }
              >>
              >>
              >> correctly creates a file "null" containing the words foo and bar.
              >>
              >> Not that I want to defend MS (their software and OSs suck) but in
              >> this case
              >> I'd consider WinZip broken and not DOS and it's relatives.
              >>
              >> And not that this helps much because a lot of people out there are using
              >> Windows and WinZip instead of a decent OS (or at least cygwin)
              >> and tar/gzip
              >>
              >> BTW. Try
              >>
              >> grep -n foo file1 nul:
              >>
              >> under DOS. This works at least with W2K's cmd. (Ooops, I guess
              >> sometimes I have to use MS OSs myself...)
              >>
              >> Jirko
            • jirko@cassuben.net
              Just checked if using nul: instead of the null file works. It does. At least with W2K and W98 but I don t see a reason why it shouldn t work in other
              Message 6 of 7 , Aug 22, 2001
              • 0 Attachment
                Just checked if using "nul:" instead of the "null" file works. It
                does. At least with W2K and W98 but I don't see a reason why it
                shouldn't work in other DOS/Windows environments.
                So if you replace the line:

                set-variable %tool-null-file &spr "\"%s\"" &find "null" ""
                with
                set-variable %tool-null-file "nul:"

                in tools.emf, you should be able to discard the "null" file.

                jirko
              Your message has been successfully submitted and would be delivered to recipients shortly.