47469/cd-doesn-t-work-in-my-shell-script
I'm writing this script.
#!/bin/bash cd /home/tree/projects/python
I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing.
Am I doing something wrong?
One way to get around this is to use an alias:
alias proj="cd /home/tree/projects/python"
You can also run the script in your current process with the "dot" command:
. proj
You can use the read command. Here's ...READ MORE
Sorry in advance for any formatting. Check out ...READ MORE
To check if a directory exists in ...READ MORE
You can use if-else branch to check ...READ MORE
Please check the below-mentioned syntax and commands: To ...READ MORE
To help you with your doubt, if ...READ MORE
you can copy the application id from ...READ MORE
Try changing the port, Change JENKINS_AJP_PORT="xyz" to JENKINS_AJP_PORT="abc" If changing the ...READ MORE
Using -v is, imo, The best way because ...READ MORE
try to use tee: tee newfile <<EOF line 1 line 2 line ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.