iPhone .bashrc 无法正常工作

标签 iphone linux bash ssh jailbreak

已解决:我在文本编辑器中选择了错误的行结尾

我尝试在我的 iPhone 上运行 .bashrc,只是为了好玩。将 source/var/root/.bashrc 添加到我的 /etc/profile 文件后,每次登录本地或通过 SSH 的终端模拟器时都会收到此消息。

: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
>

每次输入时,我的光标都会覆盖“>”

/var/root/.bashrc的内容

alias install='apt-get install'
alias remove='apt-get remove'
alias aptsearch='apt-cache search'

alias respring='killall SpringBoard'
alias safemode='touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat && killall SpringBoard'
alias shutdown='halt'
alias poweroff='halt'

alias ls='ls -group-directories-first -Ah'
alias lsl='ls -Ah1 --group-directories-first'

alias killall='killall -v'

alias reload='source /var/root/.bashrc'

export PS1='\w> '

clear

/etc/profile的内容

export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games'
export PS1='\h:\w \u\$ '
umask 022

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done
source /var/root/.bashrc

感谢任何和所有帮助。

已解决:我在文本编辑器中选择了错误的行结尾

最佳答案

尝试手动执行脚本并查看输出。您应该获得一个行号来帮助您。

关于iPhone .bashrc 无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16889476/

相关文章:

iphone - 如何编辑 NSUserDefaults 中的存储值

iphone - UIKeyboardDidHideNotification 错误应用程序崩溃

iphone - Xcode - 根据正在编译代码的设备修改库搜索路径

linux - ACL 如何影响 ls/stat() 结果?

linux - 如何在 bash 中对逗号分隔值进行排序?

iphone - 在字符串中搜索某个字符串,并在原字符串中将其设为粗体

linux - MPlayer — 改变视频文件的亮度/对比度并保存输出

Linux 读入一个数组

regex - 如何检查 curl 的 http_code 是否在 200 和 299 之间

mysql - 在 Bash 脚本中将 Linux 命令输出插入 MySQL