Re: mtab very long

From: Maurits van Rees (maurits_at_vanrees.org)
Date: 05/25/05

  • Next message: Paulo Marcel Coelho Aragão: "Making kaffeine/xine play audio properly"
    Date: Wed, 25 May 2005 12:40:30 +0200
    To: debian-user@lists.debian.org
    
    
    

    On Wed, May 25, 2005 at 11:28:04AM +0100, michael wrote:
    > On Wed, 2005-05-25 at 12:00 +0200, Urs Thuermann wrote:
    > > : > /etc/mtab
    >
    > what's the ':' do???

    Nothing. At least hardly anything worth mentioning. See this snippet
    from the bash manual:

    #####
    SHELL BUILTIN COMMANDS
           : [arguments]
        No effect; the command does nothing beyond expanding arguments and
        performing any specified redirections. A zero exit code is returned.
    #####

    That also means it doesn't have any output. This empty output
    is now redirected to /etc/mtab, making that file empty. You can try
    other methods as well, e.g. 'cat /dev/null > /etc/mtab'.

    maurits@mauritsvanrees:~$ echo "Hello World" > temp
    maurits@mauritsvanrees:~$ cat temp
    Hello World
    maurits@mauritsvanrees:~$ : > temp
    maurits@mauritsvanrees:~$ cat temp
    maurits@mauritsvanrees:~$

    Does anyone know any other uses for this ':' command?

    HTH,

    -- 
    Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
    Public GnuPG key: keyserver.net ID 0x1735C5C2
    "Let your advance worrying become advance thinking and planning."
     - Winston Churchill
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Paulo Marcel Coelho Aragão: "Making kaffeine/xine play audio properly"

    Relevant Pages

    • Re: mtab very long
      ... > maurits@mauritsvanrees:~$ cat temp ... > Does anyone know any other uses for this ':' command? ... everything so I guess the suggestion was just a way to reconstruct mtab ...
      (Debian-User)
    • Re: questions about colon ":" command
      ... > specified redirections" mean? ... And if the command has no effect, ... > why do I see it used in so many shell scripts? ... It does nothing as far as I can tell, just returning an exit code 0 ...
      (comp.unix.shell)
    • Executing comman from string.
      ... I have variable in the shell script which have assigned ... I nave no idea how to execute this command. ... but all times got empty output. ...
      (comp.unix.shell)
    • Re: Executing comman from string.
      ... I have variable in the shell script which have assigned ... I nave no idea how to execute this command. ... but all times got empty output. ...
      (comp.unix.shell)
    • Re: Executing comman from string.
      ... I nave no idea how to execute this command. ... but all times got empty output. ...
      (comp.unix.shell)