Hi Im' trying to output a list of files then make the list files as choices, need someone to give me hand.
so far here is what i got.. a bit messy
Code:
#!/bin/sh
menu_str=`ls -1 file*`
cnt=0
for i in $menu_str
do
menu_item[cnt]=${i}
cnt=$(($cnt+1))
echo $cnt
echo ${menu_item[*]}
done
#echo $cnt ${menu_item[*]}
i=-1
echo Enter your number of choices
read choice
while [ $i -lt $cnt ]; do
#echo "$i ${menu_item[$i]}"
let i++
if [ $i -eq $choice ]; then
echo "you have chosen $i ${menu_item[$i]}"
exit 1
fi
done
Hello Dears,
My server hots cannot contacted my array disk 2540 by using out-of-band Ethernet Cable.
The Controller Ethernet port is off , I replace the ethernet cable but not OK
I reboot the server and the Array disk 2540 but Not OK.
Please somebody know how to solve this issue?
... (1 Reply)
I want to pass this array as a parameter.
IFS=$'\n'
fortune_lines=($(fortune | fold -w 30 ))
Inside of this line
screen -p 0 -S ${SCREEN_SESSION} -X stuff "`printf "say ${fortune_lines}\r"`"
And I am lost at this point.
I am thinking something like this?
Then make it loop..
... (7 Replies)
Hello all,
I have the below script and I'm a little stuck on the best way to continue.
Essentially I'm creating a text file (systems.txt) with a list of servers in it by hostname. Then I would like to echo a menu with each hostname and a number to use to pick it from the list. It's somehow... (7 Replies)
First time so excuse my ignorance please.
I may not be accurately describing the issue.
I have inherited a small lab mostly SUN V120s.
We lost power and are trying to recover.
Nope no backups...
The primary issue I have is 1 box is an Oracle Server.
It has 2 36Gb harddrives.
I am able to... (3 Replies)