我正在我的保管箱上设置一个 .txt 文件,它将在我的笔记本电脑和台式机之间自动同步。此 .txt 文件包含我希望在这些计算机之间保持同步的 .bash_profile 的所有内容,包括当前看起来像这样的别名:
配置文件配置
alias bprofud="cat ~/Dropbox/profile.txt > ~/.bash_profle"
(其中“bprofud”== bash 配置文件更新的简称)
这里的想法是,为了在两台计算机上保留对我的 bash 配置文件所做的任何更改,我只需编辑我的保管箱中的文本文件,然后在每台计算机上运行“bprofud”。
虽然这不起作用。我不确定为什么。它只是每次都写入一个新的 .bash_profile 而不是覆盖前一个。
我正在运行最新版本的 MacOSX。
知道可能出了什么问题吗?
最佳答案
原因是一个简单的拼写错误;)
alias bprofud="cat ~/Dropbox/profile.txt > ~/.bash_profle"
应该是
alias bprofud="cat ~/Dropbox/profile.txt > ~/.bash_profile"
你只是错过了“我”
关于linux - 将 .txt 文件的内容分类为 .bash_profile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35387898/