【问题标题】:What programming language is Init.goldfish in android written in?android中的Init.goldfish是用什么编程语言写的?
【发布时间】:2012-01-15 20:16:57
【问题描述】:

这是来自 Ubuntu 的 .bashrc 的一部分(显然是相同的语言):

# 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 关键字。我怎样才能学习那种语言?我更喜欢在线教程或源代码存储库而不是书籍。

【问题讨论】:

  • 它是bash。在 Google 上搜索“shell 脚本”。
  • 这是bash 的shell 脚本,.bashrc 在有新的终端窗口/交互式会话时运行。请注意,搜索 what is bashrc 之类的内容会占用大量资源。
  • 这是 Unix 命令语言 - bash tldp.org/LDP/abs/html 或 1000.0000.0000 其他教程:D.
  • bash 教程位于:hypexr.org/bash_tutorial.php

标签: android init


【解决方案1】:

它是 UNIX shell 脚本,由 bash 等 shell 实现的标准化脚本语言。它非常适合在基于 UNIX 的系统(例如 Linux 或 Android)上自动执行小任务。

在谷歌上搜索unix shell script tutorial 之类的内容将为您提供大量教程。

【讨论】:

  • 不确定我是否会称之为“标准化”,因为不同的外壳实现不同的功能。
  • 不同的 shell 确实实现了不同的方言,但是 Bash 实现的那个至少在很大程度上与 POSIX shell 命令语言 (pubs.opengroup.org/onlinepubs/009695399/utilities/…) 兼容。
猜你喜欢
  • 1970-01-01
  • 2011-03-20
  • 1970-01-01
  • 2011-02-14
  • 1970-01-01
  • 1970-01-01
  • 2012-09-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多