2012-01-15 34 views
0

這是對.bashrc中的從Ubuntu的(顯然是同一種語言)的一部分:在android中用Init.goldfish編寫什麼編程語言?

# If not running interactively, don't do anything 
[ -z "$PS1" ] && return 

# don't put duplicate lines in the history. See bash(1) for more options 
# ... or force ignoredups and ignorespace 
HISTCONTROL=ignoredups:ignorespace 

# append to the history file, don't overwrite it 
shopt -s histappend 

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 
HISTSIZE=1000 
HISTFILESIZE=2000 

# check the window size after each command and, if necessary, 
# update the values of LINES and COLUMNS. 
shopt -s checkwinsize 

那麼,什麼是語言?它有一個fi關鍵字。我該如何學習這門語言?我更喜歡在線教程或源代碼庫來讀書。

+2

它是[bash](http://www.gnu.org/software/bash/)。在谷歌搜索「shell腳本」。 – Mat 2012-01-15 20:18:53

+0

這是'bash'的shell腳本,'.bashrc'在有新的終端窗口/交互式會話時運行。請注意,搜索「什麼是bashrc」會導致很多資源。 – 2012-01-15 20:20:30

+0

這是Unix命令語言 - bash http://tldp.org/LDP/abs/html/ 或1000.0000.0000其他的指示符:D。 – madflow 2012-01-15 20:20:34

回答

0

它是UNIX shell腳本,由shell(如bash)實現的標準化腳本語言。它在基於UNIX的系統(如Linux或Android)上自動執行小型任務很有用。使用Google搜索unix shell script tutorial會給你很多教程。

+0

不知道我竟然稱之爲「標準化」,因爲不同的shell實現了不同的功能。 – 2012-01-15 20:25:48

+0

不同的shell確實實現了不同的方言,但Bash實現的方法至少與POSIX shell命令語言(http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html)兼容。 – 2012-01-15 21:15:30