Posts Tagged With: shell

Watch for Ubuntu 9.10 Launch

Tagged with: , , , , , , ,

This script will run check for ubuntu launch once every 5 mins and let you know if there is an launch.


while [ 1 ]; do if [ -z "`curl -I "http://cdimage.ubuntu.com/releases/9.10/release/"|grep "404"`" ]; then kdialog --msgbox "9.10 Released"; exit; fi; sleep 300;  done
2 Comments »

Create Random Password

Tagged with: , , , , , , , ,

Use this command to create a random password


< /dev/urandom tr -dc A-Za-z0-9_ | head -c8

Also see…

No Comments »

A Shell Scirpt to Mount ISO files

Tagged with: , , , , ,

A Shell Scirpt to Mount ISO files – call it using the command moustiso.sh ImageFile.iso. You need a folder called /mnt/Image for this to work


#!/bin/sh
sudo mount -o loop "$*" /mnt/Image/
3 Comments »

chsh Command

Tagged with: , , , , ,

Command to know if you have to remote into another box


chsh --list-shells
4 Comments »

env – Shell/Envionment Variables

Tagged with: , , , , , ,

Show all the variables in the shell.


env
No Comments »

Change shell

Tagged with: , , , ,

Change shell command


chsh
No Comments »

Spy on SSH Users

Tagged with: , , , ,

See what your users are doing using SSH connected to your system – this will show you what happens on the first console. If someone is typing, you’ll be able to get an output of his keystrokes. Substitute cat /dev/vcs1 with cat /dev/vcs2 or cat /dev/vcs3 and so on for other consoles.


cat /dev/vcs1

Original Article

1 Comment »

Shell Script for Batch Convertion of Images

Tagged with: , , , , , ,

An easier way to batch convert images using the ‘convert’ command


#!/bin/sh
# An Easy command to use the convert command. Makes sure that the rename problem don't happen

if [ ! -d "Out" ]; then
        mkdir Out
fi

sel="*.*"
if [ $# -eq 2 ] ; then
        sel=$2
fi

for i in $sel; do
        echo -n "Converting $i ... "
        convert $1 $i Out/$i
        echo "Done"
done
3 Comments »

Change the Shell

Tagged with: , , , ,

Use this command to change the default shell you are using.


chsh
No Comments »

A Shell Script to Create a Build of Firefox Extension

Tagged with: , , , , , , ,

This shell script will create a build of a firefox extension in linux. This is created according to my details(eg, the guid has @binnyva.com in it) – but you can modify it and use it yourself.


app=$1
folder=$2

if [ $# -eq 0 ] ; then
	echo "Useage: sh build.sh  []"

elif [ $# -eq 1 ] ; then
	folder="$1@binnyva.com/"
fi

rm $app.xpi
cp -r $folder temp
cd temp
rm -rf .git

zip -r $app.xpi .>/dev/null
mv $app.xpi ..
cd ..
rm -rf temp
echo "Built $app successfully"

No Comments »