mirror of
https://github.com/flokoe/bash-hackers-wiki.git
synced 2024-11-01 14:53:06 +01:00
b75c3a588b
find docs/ -depth 3 -name '*.md' | xargs grep '(.*/' -l | \ xargs -I{} \ sed -i '' \ -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)\(.md\)\{0\})%(../../\1/\2.md)%g' \ -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)#\([a-zA-Z_-][0-9a-zA-Z_-]*\))%(../../\1/\2.md#\3)%g' \ -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)\(.md\)\{0\})%(../../\1/\2/\3.md)%g' \ -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)#\([a-zA-Z_-][0-9a-zA-Z_-]*\))%(../../\1/\2/\3.md#\4)%g' \ -e 's%](\([^:.>)#][^:.>)#]*\))%](../../\1.md)%g' \ -e 's%](\([^:.>)#][^:.>)#]*\)#\([^:.>)#][^:.>)#]*\))%](../../\1.md#\2)%g' \ {} Related to https://github.com/flokoe/bash-hackers-wiki/issues/10
1.3 KiB
1.3 KiB
The export builtin command
Synopsis
export [-fn] [NAME[=VALUE] ...]
export -p
Description
The export
builtin command is used to mark variables or functions
referenced by NAME
for automatic export to the environment. If NAME
is a shell variable, a value VALUE
can be assigned before exporting
it.
Options
Option Description
-f
refer to shell functions
-n
remove the export property from any referenced NAME
-p
print all exported variables, with -f
, print all exported functions - all in a format re-usable as input
An argument of --
disables further option processing.
Return status
Status Reason
0 no error
!=0 invalid option
!=0 a given NAME
is invalid
Examples
Set the display to use when launching a GUI application (useful during SSH sessions):
export DISPLAY=":0"
Set your default text editor (e.g. SublimeText):
export EDITOR=subl
Portability considerations
- in POSIX(r), only the
-p
option is specified - in POSIX(r), only variables (with value assignment) are to be exported, not shell functions