Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Need some help with Bash
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="V6Pony" data-source="post: 1415324" data-attributes="member: 177295"><p>Ok. I'm wanting to learn some bash scripting. Found a good tutorial that I'm working through. I set up a dir to store programs bash files in. ~/Bash_Study/Programing_Study. I know that is a bit long in the tooth. So I wanted to add this location to my $PATH so I would not have to type out the path to run the files. I was able to use the export command to send the path location to $PATH. This works until you log out and back in then the setting is gone.</p><p></p><p>This is where the fun begins. So I think well just edit the path file to keep the setting after log off. From out of the past I thought that the path was in a file .profile or .bashrc. So I look for these files and can not find them anywhere. Nor can I find any file that I can edit the PATH setting. So where the **** is it? </p><p></p><p>Some one told me to try echo 'export PATH=/path/to/some/dir<img src="/mac_images/images/smilies/Money-Mouth.png" class="smilie" loading="lazy" alt=":$" title="Money Mouth :$" data-shortname=":$" />PATH' >> .profile to create the .profile file and fill it with the path statement. In my case this would have been echo 'export PATH=~/<img src="/mac_images/images/smilies/Money-Mouth.png" class="smilie" loading="lazy" alt=":$" title="Money Mouth :$" data-shortname=":$" />PATH >> .profile. After doing this I would get errors when restarting terminal. I tried to edit .profile with pico. Still did not work.</p><p></p><p>Anyone know how to do advise me what I'm doing wrong ?</p><p></p><p>Thanks</p></blockquote><p></p>
[QUOTE="V6Pony, post: 1415324, member: 177295"] Ok. I'm wanting to learn some bash scripting. Found a good tutorial that I'm working through. I set up a dir to store programs bash files in. ~/Bash_Study/Programing_Study. I know that is a bit long in the tooth. So I wanted to add this location to my $PATH so I would not have to type out the path to run the files. I was able to use the export command to send the path location to $PATH. This works until you log out and back in then the setting is gone. This is where the fun begins. So I think well just edit the path file to keep the setting after log off. From out of the past I thought that the path was in a file .profile or .bashrc. So I look for these files and can not find them anywhere. Nor can I find any file that I can edit the PATH setting. So where the **** is it? Some one told me to try echo 'export PATH=/path/to/some/dir:$PATH' >> .profile to create the .profile file and fill it with the path statement. In my case this would have been echo 'export PATH=~/:$PATH >> .profile. After doing this I would get errors when restarting terminal. I tried to edit .profile with pico. Still did not work. Anyone know how to do advise me what I'm doing wrong ? Thanks [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Need some help with Bash
Top