[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
IF statements on the command line in bash
- From: "Rodolfo J. Paiz" <rpaiz indahaus com>
- To: redhat-list redhat com
- Subject: IF statements on the command line in bash
- Date: Mon, 01 Oct 2001 14:52:49 +0000
From the "I must have missed something" department:
I often find myself needing to do simple, short if's or for's from the
command line. However, I can't seem to get the hang of it. As an example,
these two don't work:
$ for i in 21 22 23 24 25 26 27 28 29 30 ; echo "Sep $i" ; done
$ if [ -x /etc/hosts ] ; echo "File exists." ; done
Can't find what's wrong from the man page; is it that you can't do this
from the CLI, or am I doing something wrong?
--
Rodolfo J. Paiz
rpaiz indahaus com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]