| Both sides previous revisionPrevious revision | |
| en:utility-scripts:chttl [2025/01/06 00:38] – Webmaster VitaNetworks | en:utility-scripts:chttl [2025/01/06 00:46] (current) – Webmaster VitaNetworks |
|---|
| |
| You may follow the bash's own example by invoking the functions file from ''~/.bash_profile'' e.g; ''if [ -f "${HOME}/bin/bashfunctions" ]; then . "${HOME}/bin/bashfunctions"; fi'' where the file was created to live alongside your scritps on ''"${HOME}/bin"'' and it would be a much easier job syncing things across systems. | You may follow the bash's own example by invoking the functions file from ''~/.bash_profile'' e.g; ''if [ -f "${HOME}/bin/bashfunctions" ]; then . "${HOME}/bin/bashfunctions"; fi'' where the file was created to live alongside your scritps on ''"${HOME}/bin"'' and it would be a much easier job syncing things across systems. |
| |
| You can create the file in ''~/bin/bashfunctions'', for example, so it lives with your other scripts, presumably, and it would be a much easier job syncing things across systems. | |
| |
| where your other scripts presumably would be so Put the file in a place where you If you put the files in create a file such as ''~/bin/bashfunctions'' and call it from ''~/.bash_profile'', so it lives with your scripts, assuming that's where you'll keep them and you have a much easier job syncing things across systems, e.g; | |
| <code> | <code> |
| [Sun05@23:20:52][vuser@vpro:~] $〉ls | [Sun05@23:20:52][vuser@vpro:~] $〉ls |
| 24 -rw------- 1 vuser vgroup 12K Jan 5 23:04 .bash_history | 24 -rw------- 1 vuser vgroup 12K Jan 5 23:04 .bash_history |
| 8 -rw-r-xr-x@ 1 vuser vgroup 1.7K Oct 25 16:51 .bash_profile* | 8 -rw-r-xr-x@ 1 vuser vgroup 1.7K Oct 25 16:51 .bash_profile* |
| #↑ Add 'if [ -f "${HOME}/bin/bashfunctions" ]; then . "${HOME}/bin/bashfunctions"; fi' ↑# | ######################################################################################################## |
| ############################################################ | #↑↑↑ Add 'if [ -f "${HOME}/bin/bashfunctions" ]; then . "${HOME}/bin/bashfunctions"; fi' ↑↑↑# |
| | ######################################################################################################## |
| 8 -rw-r--r-- 1 vuser vgroup 1.5K Jul 3 2024 .bash_profile.bak | 8 -rw-r--r-- 1 vuser vgroup 1.5K Jul 3 2024 .bash_profile.bak |
| 8 -rw-r-xr-x@ 1 vuser vgroup 1.1K Mar 27 2024 .bash_profile.pysave* | 8 -rw-r-xr-x@ 1 vuser vgroup 1.1K Mar 27 2024 .bash_profile.pysave* |
| 16 -rw-r-xr-x@ 1 vuser vgroup 4.7K Oct 14 16:01 .bashrc* | 16 -rw-r-xr-x@ 1 vuser vgroup 4.7K Oct 14 16:01 .bashrc* |
| 0 drwxr-xr-x 172 vuser vgroup 5.4K Jan 5 16:18 bin/ | 0 drwxr-xr-x 172 vuser vgroup 5.4K Jan 5 16:18 bin/ |
| | |
| [Sun05@23:50:41][vuser@vpro:~] $〉ls bin | [Sun05@23:50:41][vuser@vpro:~] $〉ls bin |
| total n | total n |
| 8 -rwxr-xr-x 1 vuser vgroup 2.6K Oct 18 13:02 bashaliases* | 8 -rwxr-xr-x 1 vuser vgroup 2.6K Oct 18 13:02 bashaliases* |
| 16 -rwxr-xr-x@ 1 vuser vgroup 6.8K Jan 5 00:10 bashfunctions* | 16 -rwxr-xr-x@ 1 vuser vgroup 6.8K Jan 5 00:10 bashfunctions* |
| | ######################################################################################################## |
| | #↑↑↑ Functions file example ↑↑↑# |
| | ######################################################################################################## |
| 8 -rwxr-xr-x 1 vuser vgroup 3.5K Nov 1 17:20 bashvars* | 8 -rwxr-xr-x 1 vuser vgroup 3.5K Nov 1 17:20 bashvars* |
| 8 -rwxr-xr-x 1 vuser vgroup 30B May 1 2022 catprivkey* | 8 -rwxr-xr-x 1 vuser vgroup 30B May 1 2022 catprivkey* |