Each recommendation is detailed below along with a Bash shell script for illustration.
下面详细讲述了每一条建议以及用于说明问题的脚本。
In fact, for many Linux systems, bash is commonly preinstalled as the default shell environment.
实际上,对于许多Linux系统,bash常常是预安装的默认shell环境。
The advantages of using Bash shell scripts for function testing are.
使用Bash shell脚本进行功能测试的优点在于。
In the Bash shell, for example, -u ensures that any unset variables are treated as an error.
例如,在Bash外壳中,- u可确保将任何未设置的变量作为错误处理。
This section describes how to run the Bash shell scripts for function testing.
本节描述如何运用Bash shell脚本进行功能测试。
You should avoid these keywords—or what are known as bash shell reserved words—when choosing names for shell variables.
在为shell变量选择名称时,应该避免使用这些关键词(也称为bash shell保留字)。
To write effective bash shell scripts, you must master the basic bash command set for navigation and daily routine tasks performed within the shell.
要想编写有效的bash shell脚本,就必须掌握在shell中执行导航和日常任务的基本bash命令集。
If your default shell is not Bash, and if the script does not work for you, then use the second form of calling shown below.
如果您的默认shell不是Bash,如果您的脚本无法运行,那么可以使用下文所示的第二种调用形式。
Thankfully, most of today's shells counter this by at least automatically resetting the IFS variable when they start -- and that includes GNU bash, the usual shell for GNU/Linux systems.
值得欣慰的是,当今大部分的shell 都对此进行了防范,当它们启动时至少会自动重新设置IFS变量 --包括GNUbash,GNU/Linux常用的shell。
Remember to quote these if you are invoking GRUB with parameters from a bash shell, for example, when installing GRUB onto a floppy, USB key, or your MBR.
如果使用这些参数从一个bash shell调用GRUB,例如,在软盘、USB 密匙或您的MBR 上安装 GRUB 时,别忘了使用引号将参数引起来。
This community project provides a framework of extensions and convenience for the Bash shell.
这个社区项目提供了用来扩展和简化Bash shell的框架。
Creating Bash shell scripts for function testing.
创建Bash shell脚本进行功能测试。
Bash is also ideal for secure environments, having a restricted start mode that can confine a user's ability within the shell to a brief, determinable list of commands.
bash还非常适合于安全性要求高的环境,它具有受限制的启动模式,可以把shell中的用户限制为只能执行一组确定的命令。
In this article, you will learn the basic techniques of bash scripting, its everyday USES, and methods for employing it to create near-bulletproof shell scripts.
在本文中,您将学习bash脚本编程的基本技术、日常使用方法以及用它创建可靠的shell脚本的方法。
Given such a setup, you can construct a simple BASH shell script (see Listing 8) to check for DWG and DXF files in this location and trigger the converter with the appropriate command-line arguments.
有了这样的设置,就可以构造一个简单的BASH shell脚本(参见清单8)来检查此位置的DWG和DXF文件并且通过适当的命令行参数触发这个转换器。
The bash shell uses the tab key for command completion, so it can be handy to have a captive tab character that you can use when you want a real tab.
bash shell使用制表键表示命令结束,因此当我们需要一个真正的制表符时,使用一个专用 tab字符将非常方便。
GNU Bash shell: Find documentation and source for the GNU Bash shell on its project page.
GNUBash shell:在gnu Bash shell项目页面上找到它的文档和源码。
The shell syntax used in the examples here is suitable for GNU Bash; please refer to your shell's manual for the specific syntax you'll need to use (or consider switching to Bash, I suppose).
本文的示例所使用的Shell语法适用于GNUBash,有关需要使用的特定语法,请参考您的Shell手册(或者可以考虑使用Bash)。
This console includes five tabs for accessing a resource panel, a log viewer, a presence panel (for wireless attached XO-1 laptops), and a terminal (Bash shell), respectively.
此控制台包含五个选项卡,分别用于访问资源面板、日志查看器、当前面板(用于无线型XO - 1膝上型电脑)和一个终端(Bash shell)。
On a UNIX-based operating system, this is most easily accomplished by using the STDIN redirection character that is appropriate for your shell, such as the less-than symbol (<) for the Bash shell.
在基于UNIX 的操作系统中,通过使用适合您的shell的STDIN重定向字符最容易实现了,比如为 Bash shell 使用小于号 (<)。
Also, since you'll most likely want to see the default prompt, you can switch shells by simply running the binary name for the shell. (sh, ash, bash, ZSH, CSH, KSH, and so forth).
通常你会想看看默认的提示符,你可以通过运行shell的命令来切换到相应的shell (sh、ash、bash、zsh、csh、ksh等等)。
Listing 1 shows a bash shell script that you might code to try running the xclock command for a specified period of time.
您将编写清单1所示的bash shell脚本来按照指定的时间段运行xclock命令。
Even if you changed your default shell, bash is probably still running somewhere on your system, because it's the standard Linux shell and is used for a variety of purposes.
因为bash是标准Linuxshell,并用于各种目的,所以,即使更改了缺省shell, bash可能仍在系统中某处运行。
Now that you have the basics of bash shell scripting well in hand, you must promise to only use your powers for the greater good.
既然掌握了bash shell脚本编程的基础,就必须善用这种能力。
Most UNIX users amass settings in shell startup files, such as .bashrc (for the Bash shell) and .zshrc (for the Z shell), to recreate a preferred shell environment time and again.
大多数UNIX用户在.bashrc(针对Bash shell)和 .zshrc(针对Z shell)等 shell启动文件中塞满大量用户设置,以便一次又一次地重建钟爱的 shell环境。
If you want to eliminate those, you can redirect the ij tool's standard output and standard error. For example, if you're working in the Bash shell, you can do this with.
如果想要消除这些消息,可以重定向ij工具的标准输出和标准错误。
If you want to eliminate those, you can redirect the ij tool's standard output and standard error. For example, if you're working in the Bash shell, you can do this with.
如果想要消除这些消息,可以重定向ij工具的标准输出和标准错误。
应用推荐