For bash:
cd - Change to the previous working directory. Esc + . The last command line argument of the last comment ^w erase word ^u erase from here to beginning of the line (I use this ALL the time.) ^a move the cursor to the beginning of the line ^e move the curor to the end of the line
In recent versions of bash you can specify the maximum number of characters to read:
read -p "Erase the windows partition (Y/n)? " -n1
A simple script: tolower
function range () {
if [ $1 -ge $2 ]; then
return
fi
a=$1
b=$2
while [ $a -le $b ]; do
echo $a;
a=$(($a+1));
done
}
> for i in $(range 1 5) ;do echo $i;done
1
2
3
4
5