New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I change the terminal working directory ? #445
Comments
Hi there! I'm not sure if I understood the request completely but from what I understand you want to execute an command in a specific folder? For example the following command will output the content of
But in the second case, and you want to change the directory of the terminal (not castor working directory) Under the hood Not tested, but maybe chdir can do the job but care about the note As alternative you can do something like this to run bash terminal in specific directory :
But keep in mind that will run under castor and not the terminal directly like a simple |
Thanks a lot. Your solution works but indeed, it would be good to know if there is an impact, particularly if we use the script several times, we will find ourselves launching several nested processes? |
Are you trying to make a castor script that would be the equivalent of running Because to execute a PHP script from a Bash terminal that makes your Bash session switch to a specific directory, you'll need to handle the directory switch on the Bash side because a PHP script cannot directly manipulate the environment of the shell that calls it. In any other cases, what Theo suggested is the way to go when something you run needs to be ran in a specific directory. Maybe posting the full context of what you're trying to achieve could help. |
yes, this is the feature I need to do 馃槕 |
For instance:
I tried :
but nothing works 馃檮
The text was updated successfully, but these errors were encountered: