Change the Shell
Tagged with: change, chsh, command, Linux, shell
Use this command to change the default shell you are using.
chsh
Use this command to change the default shell you are using.
chsh
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"
Use this command if you want to know your command usage stats in the fish shell.
grep -v "^\#" ".config/fish/fish_history"|awk '{print $1}'|sort|uniq -c|sort -rn|head -n10
The alias/function of the fish shell are stored at ‘/home/username/.config/fish/functions’
This will let you run a linux command based on the success of anther command. Note: This will only work in bash shell.
ruby Create_PDF.rb && if [ $? == 0 ]; then kpdf report.pdf; fi
Fish shell has an easy method to create a command alias…
alias del='rm'
save_function del
This is how you create a permanent alias is fish…
alias x='exit'
save_function x
One can use awk to get a specific column from a command output…
First column of the command
date|awk '{print $1}'
11th Column of the command
ps aux|awk '{print $11}'
Use a different Field separator
cat /etc/passwd|awk -F ':' '{print $1}'
[tags]awk,sed,shell,script,output,filter,text,cli,linux,string,separator[/tags]