Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Continuous bash script to do tasks

opt=y
while [ $opt = y -o $opt = Y ]
do
        echo -e "Enter first  number: c"
        read -r a

if [ $(bc <<< "$a > 0.0 && $a > 0") ]; then
        result=$(bc <<< "scale=2; $a * $a")
        echo "Square of $a: $result"
else
        echo "Bitch, put a number. Nothing else."
fi

echo -e "Want to continue? [y/n] c"
read -r wish

if [ $wish == y -o $wish == Y ]; then
        continue
else
        exit
fi

done
Comment

PREVIOUS NEXT
Code Example
Shell :: How do I check my graphics card size in Linux? 
Shell :: pulish changes to firebase function 
Shell :: terminal snap changes check percentage 
Shell :: command to find jobs running in the background 
Shell :: vscode regex for url 
Shell :: mv rename folder 
Shell :: verify SHA256 in Windows Power Shell 
Shell :: Warning : no large blobs matching criteria found in packfiles - does the repo need to be packed? 
Shell :: space as delimiter in cut command 
Shell :: change local Git email address to match GitHub account email 
Shell :: how to install pm2 in obunto without npm 
Shell :: move all files in one folder to another too many files mv: Argument list too long 
Shell :: gitattributes -diff 
Shell :: ubuntu show RLIMIT_NOFILE 
Shell :: upgrade r from consele 
Shell :: linux mount all fstab 
Shell :: Kubernetes: Remove taint from node 
Shell :: hbase put command terminal 
Shell :: mac zhs not found 
Shell :: Fedora RPM Fusion with dnf 
Shell :: download ubports-installer 
Shell :: ring Change the current directory 
Shell :: ssh to gcp vm 
Shell :: how to uninstall nginx in ubuntu 20.04 
Shell :: post clone remove line in file 
Shell :: PULSEUADIO to PIPEWIRE default.pa - pipewire.conf 
Shell :: http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu focal main 
Shell :: Odoo 11 Development In Ubuntu 18.04 Using Pycharm 
Shell :: when-i-start-ubuntu-it-enters-tty1-6-instead-of-my-desktop-how-do-i-get-to-de/65234#65234 
Shell :: get all files from folders to 1 parent folder 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =