answersLogoWhite

0

#!/bin/sh

echo "Please enter the username you want to check: "

read USER

grep $USER /etc/passwd > /tmp/lusertest

sleep 5

if [ -s /tmp/lusertest ]

then echo "User exists"

else echo "User does not exist"

fi

rm /tmp/lusertest

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Shell script to find out the sum of first 10 natural numbers?

Yes


Shell script to find amstrong numbers within a given range?

Check below link


Make a advertisement script?

You can find a detailed guide on how to make an advertisement script on smallbusiness.chron.com/write-advertising-script-56227.html procopytips.com/tv-commercial-script


Shell script to find LCM of the given two numbers?

Shell program to find LCM and hcf of two no.s tput clear echo "Enter first no" read a echo "Enter 2nd no" read b p= 'expr $a \* $b' while [$b -ne 0] do r= 'expr $a % $b' a=$b b=$r done LCM = 'expr $p / $a' echo "LCM = $LCM" echo "Hcf = $a"


Write a Shell program to find the smallest number from a set of numbers?

k


How do you write a Shell script to find the greatest among the given set of numbers using command line arguments?

To find the greatest number among a set of numbers provided as command line arguments in a Shell script, you can use a loop to iterate through the arguments. Here's a simple example: #!/bin/bash greatest=$1 for num in "$@"; do if (( num > greatest )); then greatest=$num fi done echo "The greatest number is: $greatest" Save this script as find_greatest.sh, make it executable with chmod +x find_greatest.sh, and run it by passing numbers as arguments, like ./find_greatest.sh 3 5 1 8.


How can you join UFO men and find attractive white women?

You can write the script any way you want it.


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


How do you write a scary movie script?

watch a scary movie and tell how you feel about it or look on another sight to find out.


Where can you find radio rebel script?

the script of


What are good Java script codes?

depending on the intention of the javascript codes you wish to write. there is much you can do with javascript but the only way to find out what "good Java script codes" are is to explore what you want the Javascript to do on the page.


How do you write an anchoring script for extempore competition in school?

First, find out all of the requirements that must be met. Then you can look up examples and use some of the ideas to write your own.