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)
the user inputs names that have to be inside square brackets
I want to check if the user puts the brackets and if not ask him to re-enter the names (9 Replies)
Hey, im trying to validate a user input and need some help. The input needs to be just a single letter. Im using a case to so this eg:
read answer
case $answer in
*) echo "OK"
;;
*) echo "This is a number"
read answer
;;
*) echo... (2 Replies)
I'm writing a bash shell script to 'help' me post to susepaste (I can NEVER remember the time options).
Here's the code:
#!/bin/bash
##########
#
# Project : personal script.
# Started : Wed Aug 03, 2011
# Author : Habitual
# Description : susepaste c-li script with user... (5 Replies)
hi all,
i have a script that need user input provide all variables that needed to complete a job.
this is my current script:
echo "type file source and it full path :"
read INPUTFILE
if || ;
then
echo "ERROR: you didn't enter a file source or file source is not... (2 Replies)
$Input_filename=$ARGV;
if (!-d $Input_filename && ! -e $Input_filename)
{
print "USAGE: Please enter '$ABCD/def/dsed.txt' as an arguement \n";
exit;
}
1. Input Is suppose to be something like "$ABCD/def/dsed.txt".
if the input is wrong the script should throw an ERROR message.... (2 Replies)
Discussion started by: Rashid Khan
2 Replies
LEARN ABOUT DEBIAN
pac
PAC(8) BSD System Manager's Manual PAC(8)NAME
pac -- printer/plotter accounting information
SYNOPSIS
pac [-cmrs] [-Pprinter] [-pprice] [user ...]
DESCRIPTION
pac reads the printer/plotter accounting files, accumulating the number of pages (the usual case) or feet (for raster devices) of paper con-
sumed by each named user, and prints out how much each user consumed in pages or feet and dollars.
When no user arguments are given, statistics are printed for every user who has used any paper.
The options are as follows:
-Pprinter
Accounting is done for the named printer. Normally, accounting is done for the default printer (site dependent) or the value of the
environment variable PRINTER is used.
-c Causes the output to be sorted by cost; usually the output is sorted alphabetically by name.
-m Causes the host name to be ignored in the accounting file. This allows for a user on multiple machines to have all of his printing
charges grouped together.
-pprice
The value price is used for the cost in dollars instead of the default value of 0.02 or the price specified in /etc/printcap.
-r Reverse the sorting order.
-s Accounting information is summarized on the summary accounting file; this summarization is necessary since on a busy system, the
accounting file can grow by several lines per day.
OUTPUT FORMAT
pac formats the output into a simple table, using four columns:
1. The host name followed by the user's login name (column "Login"). If the -m option was specified, the host name will be omitted.
2. The number of pages or feet printed (column "pages/feet").
3. The number of copies made (column "runs").
4. The total price for the user (column "price").
If no user argument was specified, pac will print a summary line with print totals.
FILES
/var/account/?acct raw accounting files
/var/account/?_sum summary accounting files
/etc/printcap printer capability database
SEE ALSO printcap(5)HISTORY
The pac command appeared in 4.0BSD.
BUGS
The relationship between the computed price and reality is as yet unknown.
BSD May 31, 2007 BSD