Forum: Shell Scripting Sep 15th, 2006 |
| Replies: 6 Views: 6,042 I changed it so awk puts it all on the same line. |
Forum: Shell Scripting Sep 12th, 2006 |
| Replies: 6 Views: 6,042 I'd use arrays:
#!/bin/ksh
optfile=filename
set -A opts $(awk 'BEGIN {FS="="} { if($0~ / page_size/) { print $2}}' $optfile)
for i in 0 1 2
do
echo ${opts[i]}
done |
Forum: Shell Scripting Sep 11th, 2006 |
| Replies: 9 Views: 7,209 #!/bin/bash
# we want to copy from path1 to path2
# step 1 make all the subdirectories
find /path1 -type d | \
while read dir
do
mkdir /path2"${dir#/path1}"
done
# step 2 cp the files... |
Forum: Shell Scripting Sep 8th, 2006 |
| Replies: 4 Views: 1,748 In that case you have to use cp. mv does not mv over mount points. |
Forum: Shell Scripting Aug 3rd, 2006 |
| Replies: 2 Views: 2,432 Your logic doesn't make any sense to me...
You want to get to the "got it" statement - this does it.
#!bin/ksh
a=5
while [[ $a -gt 5 ]]
do
echo "a=5 and not went to else cdn." |
Forum: Shell Scripting Jun 29th, 2006 |
| Replies: 5 Views: 8,994 Here is a start - you need to read up on shell scripting
#!/bin/ksh
# function gen_data
# record performance data, place in a file with each node's
# information all on one line... |