.xinitrc


Forum: X and Fluxbox
Topic: .xinitrc
started by: SuperLou

Posted by SuperLou on May 23 2005,15:44
So while I was disabling the dillo start window in ~/.xinitrc, i saw that after each command there is a ">/dev/null".  Could someone explain what these mean or what they do.  Also, there is one line of text that is just "fi", no & or >/dev/null or anything.

Thanks,
Louis

Posted by cbagger01 on May 23 2005,16:05
">" is the character that is used for command line program output redirection.

Say for example, you try a directory:

ls

and you get:

media
textfile.txt
and so on.

If you do:

ls > directory.txt

it will take this output and send it to the file named directory.txt

Now if you send it to

"/dev/null"

this is the device file that represents null or nothing

So when you send the output to /dev/null, it means that you are
throwing away any standard output text messages.

To make a short story long, this makes a command "quiet" because it discards the normal status messages that are generated by that command.

Posted by SuperLou on May 23 2005,16:39
Ok.  So messages would pop up where without the > null.  Why doesn't "fi" need a > null?
Posted by clacker on May 23 2005,17:57
fi doesn't need one because it's the end of the "if" statement. "fi" is "if" backwards, just like the end of a case statement is esac)

if [true] then
  do this
  and this
  and then this
fi

Posted by SuperLou on May 23 2005,18:29
Oy, I never would have guessed that.  One of those traditional things?  Endif or endcase wouldn't have done?  Hehe. Oh well.
Thanks,
Louis

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.