.bash-profile

    1热度

    1回答

    我修改我的.bash_profile如下: # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin ORAC

    1热度

    1回答

    我有2个Bash函数catall和grepall catall工作正常,catting每个文件它首先打印的文件名,然后在内容和新线发现 catall() { find . -name $1 | xargs -I % sh -c 'echo %; cat %; echo"" ' } grepall() { find . -name $1 | xargs -I % sh

    0热度

    1回答

    这个.bashrc函数在命令行上工作, 它是一个很棒的bash单行文件。 但将其移入bash配置文件,它停止工作? replaceInAll(){ find . -name "$1" -print | xargs sed -i 's/$2/$3/g' } 什么我没有这个让赖特?

    1热度

    2回答

    我在我的/路径下面的脚本/到/ startupscripts目录,这样我就可以用命令'emacs的打开emacs的GUI: #!/bin/sh /Applications/Emacs.app/Contents/MacOS/Emacs "[email protected]" 我编辑〜/ .bash_profile中,并加入以下行 export PATH=/path/to/startupscri

    1热度

    1回答

    我想创建一个函数添加到我的bash_profile文件,以便能够从历史记录中提取命令列表grep给定的单词和删除命令的数字。问题是,我可以直接做这样 $history | grep tar | cut -c 8- 但是当我把它变成一个功能的.bash_profile这个 function hrep() { history | grep $1 | cut -c 8- } 它没有考

    0热度

    1回答

    我在gnome-terminal上使用up和down时遇到了一个问题。 比方说我以前的命令 vi pos_of_rightmost_setbit.cpp gcc -o harsha pos_of_rightmost_setbit.cpp 在这一点上,当我按下一个向上的箭头,我看到前次的命令gcc -o harsha pos_of_rightmost_setbit.cpp这是完美的。 但是当我

    1热度

    2回答

    我一直在我的MAC上设置新软件(mongoDB,maven等)。 我想我覆盖原来的.bash_profile,而我吞并新的PATH。 现在大部分bash shell中的基本命令都不起作用。 -bash: ls: command not found 以下是在文本编辑器中打开的我的.bash_profile。 PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr

    0热度

    1回答

    我有一个bash函数在我的.bash_profile不返回结果到终端。 当我通过CLI正常运行命令时,返回结果。 ldap_check_cleaup() { ldapsearch -LLL -h itdsvbms.SomeDomain.org -p 389 \ -D "uid=SomeUser,o=SomeDomain.org" -w SomePassWord -b "ou=Peop

    1热度

    2回答

    我在64位Windows 7安装Cygwin,和我的/.bashrc位置位置是C:/cygwin64/home/admin/bashrc,但我不能看到它从Cygwin的,它是说: 庆典:/ .bashrc中:没有这样的文件或目录 我尝试是导航到该文件夹​​用命令: cd /cygdrive/c/cygwin64/home/admin/ ,然后使用: /.bashrc 但它说: 没有这样的文

    27热度

    4回答

    我正在运行Mac 10.9 Mavericks并安装了Anaconda。然而,尽管如此,当我通过终端访问蟒蛇,我仍然得到默认苹果版本: Python 2.7.5 (default, Sep 2 2013, 05:24:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin 我.bash_profile是这样的: