View Single Post
fareed_xtreme's Avatar
Posts: 238 | Thanked: 291 times | Joined on Mar 2010 @ London, UK
#1
Dear All,
I am quite a noob when it comes to Linux. I used to write advanced scripts in Windows Powershell and now I want to do the same in Linux.

The following is a script I wrote but I have no clue on how to make it executable and how can i make an icon for it to launch a script. If someone would be kind to pass a few links, will be helpful for me.

I tried to run this in my N900 and it kinda screwed up the device as I am sure i did somethin wrong. had to reflash it. So would be really honoured if omeone could help a lil so tht I can do my contribution to this forum as well.

Code:
#!/bin/bash
echo **********************************************
echo *           TrueCrypt Assistant              *
echo **********************************************
echo
choice=3
echo Please choose the approriate task.
Echo   1. Mount Crypt Drive.
Echo   2. Unmount all Drives.
while [$choice -eq 3 ]; do
read choice
if [$choice -eq 1 ] ; then
echo Mounting Crypt Drive. you may be asked for authorization password.
truecrypt -k "" --protect-hidden=no /media/mmc1/TrueCrypt /media/Crypt
tracker-processes -r
exit
else
if [$choice -eq 2 ] ; then
echo Unmounting all Crypt Drives.
truecrypt -d
tracker-processes -r
exit
else
echo Please choose either "1" or "2".
fi
fi
done
Does Linux Scripts support GOTO and Labels? Also I had referred a few sites over google to come up with this.. Hope someone helps with corrections.

Last edited by fareed_xtreme; 2010-12-07 at 06:11.