I was wondering how I can read values from a file and then proceed if those values
match a user input. For example (a simple one), a user inputs their name, then we check if that name is in a file of usernames. If it is, it says proceed, if not, then it says you are not authorized.
userlist.txt:
Last edited by Scrutinizer; 01-22-2013 at 02:08 PM..
Reason: code tags
Hello,
This may have been addressed already somewhere, however I am looking for the easiest/shortest way to validate a response from a user for a file name.
The file name should not have any of the following characters
~`!@#$%^&*()_-+={|\:;"'<,>.?/
Further the response should not have any... (2 Replies)
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Being new to this area .I have been assigned a task which i am unable to do . Can any one please help me .
Hi I have requirement where i have input file XYZ_111_999_YYYYMMDD_1.TXT and with header and series of Numbers and Footer.
I want to create a mutiple output files with each file having a... (2 Replies)
Hi,
I have below line from the config file
$__MR_CONFIG = 'userinput';
I want to get the value from the user for the "userinput" and then append the full line to another file.
Can you please let me know how can I proceed on this? I am new to unix and your help is greatly appreciated.... (3 Replies)
as the title, how can i allow a user to key in one's name, birthday and email address and save it into a specific file i have created earlier?
thank you so much for any reply. (3 Replies)
Hi,
I am new to shell scripting.
script should accept the user value and then compare that value with the null.
If null then assign the value "*" to the variable else will use the user inputed value.
How to do this ?
With Regards (3 Replies)
Hi all,
Can anyone help me on this. I have several WP sites that are affected by sql injections. But the contents are different as follows
western union india belgaum
western union india bolegaon
western union india barhaj
western union india budhana
western union india belda
western... (6 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)
I am not able to capture the user input in this script(bash).There is prompt for user input.Could some one help me capture user input while reading afile?
while read line
do
echo "$i"
path1=$line
path2=`echo $line|sed s/new_dir/old_dir/`
echo "Do you want to replace?";... (4 Replies)
In the below bash a file is downloaded when the program is opened and then that file is searched based on user input and the result is written to a new file.
For example, the bash is opened and the download.txt is downloaded, the user then enters the id (NA04520). The id is used to search... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT XFREE86
userlist
USERLIST(8) Finger-type Userlisting USERLIST(8)NAME
userlist - Userlisting of who's on your system.
SYNOPSIS
userlist
DESCRIPTION
This program simply gives you a listing of who is connected to your system. It is used primarily in the sorted listing of cfingerd, which
utilitizes the same method of display for a more uniform output between systems. (It also made more sense to do it this way instead of
having jumbled up display listings in sorted finger displays. Besides, it made more sense to do this than use finger. :)
This program functions with the same types of things in mind that cfingerd does. If the user has a .nofinger file, their username will not
be displayed in the userlisting.
Example output is shown as:
Username Real Name Idletime TTY Remote console
username I'm real ... 9d 23:59 0 (remote.site.com)
where it would display the user's login name, the user's real name, their idle time given in the format "dd hh:mm", their TTY, and their
remote location (or where they're telnetting from).
If the username is over 8 characters, the program will not search for their information in the passwd file, since it may be too long.
Besides, it checks getpwnam, anyway. :)
OPTIONS-c Give standard CFINGERD (custom) output.
-n List only people idle less than one day.
ADDITIONAL
Although userlist is not required to run as suid root, it is a good idea. The reason is it checks each users' directory for a .nofinger
file. If indeed that user has a .nofinger file in his/her directory, that user will not be shown in the userlisting.
If you change the program to run as nobody.nobody, you are free to do so. But you will also show the users if they are online, regardless
of whether or not they have a ".nofinger" file (as long as their directory is NOT world-readable.)
CONTACTING
If you like this program, have any suggestions on how it could be modified, or have bug reports, please write to: khollis@bitgate.com.
Your continued Public Domain support is appreciated! Thanks.
SEE ALSOcfingerd.conf(5), cfingerd(8), finger(1).
cfingerd 1.4.2 29 August 1999 USERLIST(8)