|
pokerfanatic
|
10-24-2007, 12:54 AM
Post subject: C programming, need help
|
#1 (permalink)
|
|
4-of-a-Kind
Join Date: Aug 2004
Location: 6max limit tables
Posts: 1,968
|
|
Hey everyone, I was tossed a program by one of my instructors to write a cd command in a mini shell he had written for our operating systems class, and the mini shell run on a linux server...
the method chdir(filename) will "change the directory" and return 0 if successful and -1 if the directory isn't found, in the C library however i need to be able to change the prompt of the line to show you are now in the new directory and i need to have the damn thing stay in that directory until i cd again out of it.
so if anyone can help that would be freaking great!
|
|
“Dream as if you’ll live forever. Live as if you’ll die today.” ~ James Dean ~
"Poker is a lot like sex, peoples perceived ability usually blinds the truth" ~ me ~
"God bless him. Got to bet big to win big! GAMB00L!!!" ~ Fnord
|
Play for FREE and practice your game at...
Join the FTR Poker Forum to disable these banners and start posting!
|
|
|~|ypermegachi
|
|
4-of-a-Kind
Join Date: Aug 2004
Location: emo-kid
Posts: 3,580
|
|
http://www.opengroup.org/onlinepubs/...ons/chdir.html
http://www.opengroup.org/onlinepubs/...ns/getcwd.html
|
|
|
|
pokerfanatic
|
|
4-of-a-Kind
Join Date: Aug 2004
Location: 6max limit tables
Posts: 1,968
|
|
you're the shit Hyper that should help thanks
|
|
“Dream as if you’ll live forever. Live as if you’ll die today.” ~ James Dean ~
"Poker is a lot like sex, peoples perceived ability usually blinds the truth" ~ me ~
"God bless him. Got to bet big to win big! GAMB00L!!!" ~ Fnord
|
|
kmind
|
|
Straight Flush
Join Date: Oct 2006
Location: Not Giving In
Posts: 4,240
|
|
pokerfanaticccccccccccccc
|
|
|
|
oskar
|
|
4-of-a-Kind
Join Date: Apr 2008
Location: in ur accounts... confiscating ur funz
Posts: 2,452
|
|
idk if that helps, but you can get the name of the currend directory with pwd or basename... if you're using shell commands. idk how all that works for you
|
|
The strengh of a hero is defined by the weakness of his villains.
|