Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: .xinitrc, Could someone explain .xinitrc?< Next Oldest | Next Newest >
SuperLou Offline





Group: Members
Posts: 124
Joined: April 2005
Posted: May 23 2005,15:44 QUOTE

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
Back to top
Profile PM WEB AOL 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: May 23 2005,16:05 QUOTE

">" 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.
Back to top
Profile PM 
SuperLou Offline





Group: Members
Posts: 124
Joined: April 2005
Posted: May 23 2005,16:39 QUOTE

Ok.  So messages would pop up where without the > null.  Why doesn't "fi" need a > null?
Back to top
Profile PM WEB AOL 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: May 23 2005,17:57 QUOTE

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
Back to top
Profile PM 
SuperLou Offline





Group: Members
Posts: 124
Joined: April 2005
Posted: May 23 2005,18:29 QUOTE

Oy, I never would have guessed that.  One of those traditional things?  Endif or endcase wouldn't have done?  Hehe. Oh well.
Thanks,
Louis
Back to top
Profile PM WEB AOL 
4 replies since May 23 2005,15:44 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: .xinitrc

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code