|
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
|
6875
|
March 16, 2007, 01:42:24 PM
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
|
3983
|
March 16, 2007, 01:39:08 PM
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
|
2905
|
March 16, 2007, 01:37:13 PM
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
|
3202
|
March 16, 2007, 01:36:21 PM
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
|
2782
|
March 16, 2007, 01:35:19 PM
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
|
3719
|
March 16, 2007, 01:33:58 PM
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
|
2986
|
March 16, 2007, 01:32:09 PM
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
|
2950
|
March 16, 2007, 01:30:01 PM
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
|
3047
|
March 16, 2007, 01:27:59 PM
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
|
3651
|
March 16, 2007, 01:24:51 PM
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
|
2624
|
March 16, 2007, 01:22:47 PM
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
|
3073
|
March 16, 2007, 01:19:54 PM
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
|
2641
|
March 16, 2007, 01:17:08 PM
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
|
10718
|
March 16, 2007, 01:14:13 PM
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
|
2542
|
March 16, 2007, 01:09:04 PM
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
|
2984
|
March 16, 2007, 01:06:42 PM
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
|
2749
|
March 16, 2007, 01:02:31 PM
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
|
2693
|
March 16, 2007, 01:00:31 PM
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
|
3285
|
March 16, 2007, 12:54:16 PM
by Mark David
|