LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-04-2003, 02:32 AM   #31
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58

Quote:
THE real answer
It should work as expected.

The cd command should result in the pwd command showing the path that cd went to. Yes when the script exits you will be where you were, but I did not think that we were making a script to cd somewhere are we?

Last edited by DavidPhillips; 11-04-2003 at 02:34 AM.
 
Old 11-04-2003, 03:38 AM   #32
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
Iam not on a linux machine at the moment, so iam not sure of the
commands, iam asking u to try.

$/> which cd
This shows u whihc "cd" is being used.

$/> whereis cd
This wud show u what all other "cd's" are there. ( I know u have already tried this, just making sure with the command)
Try with all the other "cds" other than the one shown by which cd.


Even if it stil doesnt work, maybe try execting the script in the
current shell itself,

. ./<script_name>
 
Old 11-04-2003, 06:49 AM   #33
macie
Member
 
Registered: Oct 2003
Location: /dev/null
Posts: 33

Original Poster
Rep: Reputation: 15
... why didn't i think of this earlier.. i tried ksh and problem solved. I still don't understand why it didn't work in the default shell, but i'm satisfied as long as it works. thx alot for all the help..


Macie.
 
Old 11-04-2003, 06:58 AM   #34
dkloes
Member
 
Registered: Oct 2003
Posts: 66

Rep: Reputation: 15
This was an obvious solution. If we had known from the beginning that bash was not the problem to be solved, we could have saved a lot of time. I guess I misunderstood what you were trying to accomplish. Makes you wonder what other problems you may run into with bash, but if you are happy ...
 
Old 11-04-2003, 05:00 PM   #35
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Even if you don't upgrade bash the very least you should do is reinstall the original package:
rpm -ivh --force <bash.rpm>
 
Old 11-05-2003, 06:22 AM   #36
macie
Member
 
Registered: Oct 2003
Location: /dev/null
Posts: 33

Original Poster
Rep: Reputation: 15
hehe... yes, i'm satisfied for now, but i wanna get down to the problem's source cuz i got the feeling i'll run in to it again.... i think for now thou, it has consumed more of my time than i wanted it to, so I'll leave it alone. ... but once i fugure out wth it was, i'll post it somewhere around here..


peace, and thx for all your help..

macie
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:04 AM.

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
Open Source Consulting | Domain Registration