add: friendly path-export & open startfiles for bash
This commit is contained in:
parent
1dc5b0b858
commit
5afbb937cf
5
bash/bash-open-startfiles.sh
Executable file
5
bash/bash-open-startfiles.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# lists all files, an interactive login-shell with bash would try to open. Useful to find the correct order of .bashrc .profile and such.
|
||||
|
||||
echo exit | strace bash -li |& grep '^open'
|
6
bash/friendly_path-export.sh
Executable file
6
bash/friendly_path-export.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#/!bin/bash
|
||||
|
||||
# exports a path only, if $PATH does not already contains the path.
|
||||
|
||||
NEWPATH="$1"
|
||||
echo ":$PATH:" | grep -q ":$NEWPATH:" || export PATH="$PATH:$NEWPATH"
|
Loading…
Reference in New Issue
Block a user