I am writing my own rm command in unix.
I prompt the user to type if he wants to delete a file and then read what he typed.
But how do i check what he typed?
This is my program so far:
Can anyone HELP me???
Thanks!!!
Your Script needs some correction whith respect to Unix.
If you are using Unix, then may be you should modify your script as follow:
Hope this will help you....
Last edited by radoulov; 11-30-2008 at 04:06 AM..
Reason: added code tags, please use them.
My knowledge of Unix input/output/devices is very hazy so could someone please tell me if the following is secure?
I log on to an account on a shared Unix server (Linux 2.6.18-6-686) using ssh (PuTTY). I start a python program and then type into it (python raw_input command) the... (2 Replies)
Hi,
echo "Enter file name of input file list along with absolute path : "
read inputFileList
if
then
for string in `cat inputFileList`
do
echo $string
done
else
echo " file does not exist"
fi
From the above code, if the user enters a invalid file... (1 Reply)
Good Evening. I'm new to C. Can you please help me.
I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again.
Here's my... (1 Reply)
Hi,
I need my script to check if the user enters 3 values if not 5 values to my script and alert if the input has any other number of values.
for example:
./myscript.sh 22 56 3221 - > correct
./myscript.sh 22 56 3221 45 777 -> correct
./myscript.sh 22 56 3221 45 -> incorrect
Please... (6 Replies)
Hi,
On my Java webpage which invokes the shell script has two checkboxes viz ...
apache
and
weblogic
apache require one parameter i.e apache home from the user while Weblogic requires three or five params from the user vi.z weblogic_home or <jdk_home, config_home & pid>, username and... (4 Replies)
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
I've always used code tags for code but not for showing terminal input and output. I noticed a mod edited one of my threads and now I'm confused as to proper protocol.
Mike (5 Replies)
Hi All,
#!/bin/bash
#Just trying to check if letters are in the user input. Any tips?
# I have tried regexp and using 0-9 etc, i cannot get this to work either in just an if statement or while in a loop.
echo "Please pick a number"
read num
if ; then
echo "Please enter a number"... (7 Replies)
Discussion started by: jvezinat
7 Replies
LEARN ABOUT HPUX
rwho
rwho(1) General Commands Manual rwho(1)NAME
rwho - show who is logged in on local machines
SYNOPSIS DESCRIPTION
produces output similar to the output of the HP-UX command for all machines on the local network that are running the daemon (see who(1)
and rwhod(1M)). If has not received a report from a machine for 11 minutes, assumes the machine is down and does not report users last
known to be logged into that machine.
output line has fields for the name of the user, the name of the machine, the user's terminal line, the time the user logged in, and the
amount of time the user has been idle. Idle time is shown as:
If a user has not typed to the system for a minute or more, reports this as idle time. If a user has not typed to the system for an hour
or more, the user is omitted from output unless the flag is given.
An example output line from would look similar to:
This output line could be interpreted as is logged into and his terminal line is has been logged on since September 12 at 13:28 (1:28
p.m.). has not typed anything into for 11 minutes.
WARNINGS
output becomes unwieldy when the number of users for each machine on the local network running becomes large. One line of output occurs
for each user on each machine on the local network that is running
AUTHOR
was developed by the University of California, Berkeley.
FILES
Information about other machines.
SEE ALSO ruptime(1), rusers(1), rwhod(1M).
rwho(1)