There are several shell programs available for download on the Internet that will generate prime numbers. The best way to find a prime number is through calculation, however.
echo enter a range read rng echo 2 j=3 while test $j -le $rng do i=2 x=`expr $j - 1` while test $i -le $x do if [ `expr $j % $i` -ne 0 ] then i=`expr $i + 1` else break fi done if [ $i -eq $j ] then echo $j fi j=`expr $j + 1` done
#!/bin/Bash echo "Enter the two numbers to be Multiplied:" read n1 read n2 answer=`expr $n1 \* $n2` echo $answer
shell
PHP is a server-side scripting language that can be used to dynamically generate the content of web sites served up to a client. It can also be used for local shell scripting. PHPMyAdmin is a PHP based web interface for managing MySQL databases.
There are several shell programs available for download on the Internet that will generate prime numbers. The best way to find a prime number is through calculation, however.
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
k
Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.
In an interactive shell session the shell program waits for the user to type in a command. When receiving a command the shell program will then attempt to locate it and process (execute) the command. You are interacting with the shell. Running a shell file requires a pre-stored series of commands stored in a file. Unless the shell program you are running is interactive then the shell executes each command in sequence, without involving the user at all.
You wouldn't use a shell script to do this. Any program could listen on a port by connecting or binding to a socket address. There are some utility languages such as Perl that could connect to a port and listen, but the listening would also be a function of what you are listening for.
The 'shell' is a user interface program that interfaces between a user of the system and the Operating System. It is the user interface.
If you are asking about a shell script, just create a text file with the commands you want to execute inside it. Then, make the file executable and readable and you have a shell script file. A shell program is more complicated; you need to support the user features that most users would expect a shell program or shell interpreter to do. I would suggest studying the source code of a current shell program to see how to go about implementing one of your own.
By typing its name into the shell
pwd
Certainly (yes). A shell is just a user interface program and any user can create their own if they are so inclined. If other users wish to use this new shell program (particularly as a login shell) it can be added to the /etc/shells list.
The mini shell program is used in Unix as a programming software. It is a redirected and streamlined approach at creating variables, commands, and tokens.