O'Reilly Answers is a community site for sharing knowledge, asking questions, and providing answers that brings together our customers, authors, editors, conference speakers, and Foo (Friends of O'Reilly). More »
This excerpt covers some operational aspects of running a cluster. Once you have a cluster up and running, how do you know what’s going on? Below we have some information from the O'Reilly publi...
bash has long been the go-to shell for quick one-off scripts. If you're in the midst of writing such a script and could use a handy reference of the built-in shell variables, than this excerpt from ...
Over on Slashdot user borjonx writes "Is it safer to log out of an SSH session, and re-establish it later, or just keep the connection open? Like many of you, I use OpenSSH to connect to my Slack...
Don't you hate it when someone sends you a big fat tar or zip file full of lots of files, and didn't bother to put everything in one folder? If you extract it unawares, you get dozens--maybe ...
How do you write a "traditional" loop (say, to go through some block of code 25
times) in a Unix shell script? In bash, it's simple:
for ((i = 0; i < 25; i++ ))
do
...
done
You...
Asked by dondasanjay : 27 November 2009 - 08:31 PM
Answered by KBenson : Nov 29 2009 09:55 PM
For bash:
Use double parenthesis to indicate you want ARITHMETIC EVALUATION (see the bash man page) if you are looking for a traditional C-style loop:
$ for ((i=1; i<10; i++)); do echo $... full answer >
The whois command line utility, available on all modern Unix and Linux variants, can be a fast, concise, and scriptable way to identify unknown and distant hosts, networks, and even netadmins. By the ...
Sometimes, the defaults associated with Linux shells are
annoying. For example, the spaces associated with many Microsoft
directories, such as My Directory, can adversely
affec...