LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-28-2004, 12:30 PM   #1
towlie
Member
 
Registered: Apr 2004
Location: U.S.
Distribution: slackware 10.0
Posts: 110

Rep: Reputation: 15
simple bash question -- changing dir


i know this is a REALLY dumb question, so apologies in advance.

i'm trying to cd in bash, but when you do, it only changes the dir in the bash env, in other words, for the duration of the script (at least i think that's what's goin on).

I'm sure this is due to environments, subprocesses, or other such tomfooleries.

i just want to have a script change my CWD to /foo/bar without having to type in all 50 chars of /foo/bar all the time

is there a cmd line option for cd i can use to accomplish this (tried 'man cd', but that didn't help at all)? Or, is there a separate command to accomplish this?

btw, this site has been extremely helpful to me, so thanks to everyone out there helping out newbies like myself!

oh, and if you need outputs, let me know.
 
Old 05-28-2004, 12:34 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
There's a couple suggestions at the bottom of...
<< http://www.linuxquestions.org/questi...hreadid=151537 >>
 
Old 05-28-2004, 12:39 PM   #3
towlie
Member
 
Registered: Apr 2004
Location: U.S.
Distribution: slackware 10.0
Posts: 110

Original Poster
Rep: Reputation: 15
you're quite the speed demon, ranger_nemo. many thanks!
 
Old 05-28-2004, 12:55 PM   #4
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Just happened to be online, and was a part of the previous thread.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Question - How much space is a dir taking up? elitecodex Linux - Newbie 4 06-22-2005 10:17 AM
simple bash question about cut perfect_circle Programming 2 05-17-2005 12:25 PM
Simple Bash Question sio Programming 6 11-22-2004 10:56 AM
simple bash script question bullium Programming 3 11-01-2004 03:42 PM
Simple bash question pk21 Programming 2 12-01-2002 06:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration