Write a shell script to check whether a number is Armstrong number or not?
Answer / kirtiranjan sahoo
read -p "Enter any number : " no
rev=0
temp=$no
while [ $no -ne 0 ]
do
dig=$(( $no%10 ))
rev=$(( $rev+$dig*$dig*$dig ))
no=$(( $no/10 ))
done
if [ $rev -eq $temp ]
then
echo "Armstrong"
else
echo "Not Armstrong"
fi
| Is This Answer Correct ? | 26 Yes | 23 No |
I want to upload a file to remote server through ftp daily.Can anyone suggest how to make a shell script for that.I hv credentials for that ftp
What are the different commands available to check the disk usage?
What is a shell in operating system?
How can I send a mail with a compressed file as an attachment?
What is awk in shell script?
determine the output of the following command: echo ${new:-variable}
what does "kill -9" and "kill -1" do
if i have 2 files file1 and file2.... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk
How to find duplicate record in file using shell script?
0 Answers IBM, Saama Tech, Wipro,
What is a scripting language simple definition?
write a program to display all the files from the current directory which are created in particular month
Can shell script run on windows?