Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

factorial of a number bash

read num
count=1
for((i=1;i<num+1;i++));
do
    count=$((count*i))
done
echo "Factorial is $count"
Comment

PREVIOUS NEXT
Code Example
Shell :: install postcss 
Shell :: conda install openjdk=11 
Shell :: ip on mac 
Shell :: reset branch on local git 
Shell :: how to print next lines with grep 
Shell :: mac os uninstall oh my zsh 
Shell :: heroku cli connect to app 
Shell :: ubuntu remove package and dependencies install deb 
Shell :: how to install mongoose 
Shell :: can i go back to bash from zsh mac 
Shell :: how to stop mongodb in linux 
Shell :: install mailspring ubuntu 
Shell :: linux mesuare request time http 
Shell :: is firewall running centos 7 
Shell :: how to commit code to bitbucket first time 
Shell :: bash command to find the number of files in a directory 
Shell :: restart ssh mac 
Shell :: pip command to install xlrd version 1.2.0 
Shell :: failed to download repository information ubuntu 
Shell :: install onenote in ubuntu 
Shell :: teclado abnt arch linux 
Shell :: update npm-windows 
Shell :: remove wine 
Shell :: install ssh-copy-id 
Shell :: linux get cpu temperature 
Shell :: how to install mongodb on ubuntu 22.04 
Shell :: how to know the wifi password on windows 10 
Shell :: install pygame on mac 
Shell :: how to check mac address in linux 
Shell :: zsh: command not found: brew 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =