|
Subject |
Replies |
Started by |
Views |
Last post  |
|
|
csh C shell scripts: if statement syntax csh C shell scripts: if statement
syntax
Conditional expressions
give programs life. The ability to
branch mak
|
0
|
Mark David
|
8450
|
March 16, 2007, 08:12:24 AM
by Mark David
|
|
|
csh/C shell scripts: for loop syntax csh/C shell scripts: for loop
syntax
A for loop allows a
program to iterate over a set of values.
For loops in
|
0
|
Mark David
|
4366
|
March 16, 2007, 08:09:08 AM
by Mark David
|
|
|
Determine if file exists in a Bourne/bash shell script Determine if file exists in a
Bourne/bash shell
script
[code]if [ -f testfile ]
then
echo t
|
0
|
Mark David
|
3291
|
March 16, 2007, 08:07:13 AM
by Mark David
|
|
|
Determine if a file is writable by a Bourne script user Determine if a file is writable by a
Bourne script user
From a
Bourne shell script (sh, ksh, bash,
...), it is
|
0
|
Mark David
|
3587
|
March 16, 2007, 08:06:21 AM
by Mark David
|
|
|
Determine if a file is readable by current Bourne shell script user Determine if a file is readable by
current Bourne shell script
user
A well constructed shell
script, like any
|
0
|
Mark David
|
3166
|
March 16, 2007, 08:05:19 AM
by Mark David
|
|
|
Bourne/bash shell scripts: if statement syntax Bourne/bash shell scripts: if statement
syntax
Conditional expressions
give programs life. The ability to bran
|
0
|
Mark David
|
4084
|
March 16, 2007, 08:03:58 AM
by Mark David
|
|
|
Bourne/bash shell scripts: string comparison Bourne/bash shell scripts: string
comparison
To determine if the
value of a variable ($var) is empty
(null):
|
0
|
Mark David
|
3355
|
March 16, 2007, 08:02:09 AM
by Mark David
|
|
|
Bourne/bash shell scripts: case statement Bourne/bash shell scripts: case
statement
The case statement is
an elegant replacement for if/then/else
if/els
|
0
|
Mark David
|
3368
|
March 16, 2007, 08:00:01 AM
by Mark David
|
|
|
Bourne/bash shell script for loop syntax Bourne/bash shell script for loop
syntax
A for loop allows a
program to iterate over a set of values.
For loop
|
0
|
Mark David
|
3420
|
March 16, 2007, 07:57:59 AM
by Mark David
|
|
|
Hide password entry in Bourne/bash shell script Hide password entry in Bourne/bash shell
script
Common practice for
inputing passwords is to read the text
wit
|
0
|
Mark David
|
4041
|
March 16, 2007, 07:54:51 AM
by Mark David
|
|
|
Bourne/bash shell script: while loop syntax Bourne/bash shell script: while loop
syntax
A while loop allows
execution of a code block an arbitrary
number
|
0
|
Mark David
|
2978
|
March 16, 2007, 07:52:47 AM
by Mark David
|
|
|
Bourne/bash shell script functions Bourne/bash shell script
functions
Writing functions can
greatly simplify a program. If a chunk
of code is use
|
0
|
Mark David
|
3449
|
March 16, 2007, 07:49:54 AM
by Mark David
|
|
|
bash shell script declaring/creating arrays bash shell script declaring/creating
arrays
The use of array
variable structures can be invaluable.
This recip
|
0
|
Mark David
|
2986
|
March 16, 2007, 07:47:08 AM
by Mark David
|
|
|
bash shell script iterate through array values bash shell script iterate through array
values
Having an array of
variables is of no use unless you can
use th
|
0
|
Mark David
|
11078
|
March 16, 2007, 07:44:13 AM
by Mark David
|
|
|
bash shell script accessing array variables bash shell script accessing array
variables
The bash shell allows
a number of methods for accessing
elements o
|
0
|
Mark David
|
2910
|
March 16, 2007, 07:39:04 AM
by Mark David
|
|
|
bash array operations bash array operations
sometimes
we need to remove one element from an
array for example we remove the eleme
|
0
|
Mark David
|
3350
|
March 16, 2007, 07:36:42 AM
by Mark David
|
|
|
queue and stack using array queue and stack using
array
here is a series of
operation on array, we can use these
functions to implement
|
0
|
Mark David
|
3106
|
March 16, 2007, 07:32:31 AM
by Mark David
|
|
|
simple function for print colorful text simple function for print colorful
text
function to print text
with colors(not contain all the colors)
can
|
0
|
Mark David
|
3049
|
March 16, 2007, 07:30:31 AM
by Mark David
|
|
|
Simple Menu for User Input Simple Menu for User Input
This
script will create an input screen in
BASH that allows the user to enter in
|
0
|
Mark David
|
3640
|
March 16, 2007, 07:24:16 AM
by Mark David
|