use export to set variable in bashrc
yes, I fuzz sth
#set prefix
#for
export s_pref="~/"
echo $s_pref
#for local mount point
#export s_pref="~/ws"
#s only
alias cfr='echo "cd ;ls";cd $s_pref/dr_ws/fxxxxxxx_test; ls'
do not use
s_pref="~/"
just use :
s_pref=~/
本文探讨了在Bash shell中设置环境变量的方法,包括如何在bashrc文件中定义全局变量,并通过示例展示了如何创建别名来简化常用命令的操作流程。此外,还讨论了局部变量的作用范围及其在不同场景下的应用。
4万+

被折叠的 条评论
为什么被折叠?



