Timeline for CD $Variable not working when used in a (Bash) Shell Script
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 12, 2019 at 12:22 | vote | accept | Raul Chiarella | ||
| Jul 11, 2019 at 21:24 | comment | added | G-Man Says 'Reinstate Monica' | You’re welcome. Since my answer helped you, please “accept” it by clicking on the checkmark (below the voting buttons). | |
| Jul 11, 2019 at 21:05 | comment | added | Raul Chiarella | Since the commands i need to do are pretty large, i made a function called cdZDir that does cd /usr/src; make; make install; and also workeeed. Thank you so much, appreciate it. Couldn't find the answer on that "duplicate" one | |
| Jul 11, 2019 at 21:03 | comment | added | Raul Chiarella | Hey G-Man. Thank you! Based on what u just said, i did using && on the same line and worked like a charm! | |
| Jul 11, 2019 at 3:23 | history | edited | G-Man Says 'Reinstate Monica' | CC BY-SA 4.0 | Removed reference to deleted answer. |
| Jul 10, 2019 at 20:30 | comment | added | G-Man Says 'Reinstate Monica' | (1) It seems that what you want to do is to put the entire cd /usr/src && make && make install command line into the script. (2) What’s there to know? You type a dot (.). You type a space ( ). You type the name of the script (with or without the ./). And you press “Enter”. | |
| Jul 10, 2019 at 20:18 | comment | added | Raul Chiarella | I asked a new question because the one listed as 'already answered' did'nt helped me. I don't get it. I don't know how to source the script ". ./script" | |
| Jul 10, 2019 at 20:12 | comment | added | Raul Chiarella | Like cd /usr/src && make && make install | |
| Jul 10, 2019 at 20:11 | comment | added | Raul Chiarella | Well, i need to do a make install inside a directory and i can't do it if cd does'nt go to that directory. | |
| Jul 9, 2019 at 20:44 | history | answered | G-Man Says 'Reinstate Monica' | CC BY-SA 4.0 |