I'm using the
command to read 3 inputs, namely num1, num2, and num3. I want to write a while loop that repeatedly asks for the correct number of inputs, which is 3.
Here's the pseudocode:
read user input here (must be 3)
while the number of inputs entered is less than or greater than 3, ask again for input.
Once it exits the while loop, do the rest of the script's purpose.
I need the date validation. I searched in the google but i didn't find my requirements.
requirements:
1) user has to enter the date in YYYY/MM/DD format
2) MM validations
3) DD validations.
and if the month is april it should allow 30 days only and for May month it should allow 31 days like... (1 Reply)
Hello everyone!
I am a bit inexperienced with administering queueing programs. I installed Torque (a PBS derivative) on a Linux cluster and it is running well. There is one annoying problem though: users can run massively parallel jobs and serial jobs too. Almost all users do a mix of the two. I... (0 Replies)
Hi i am a total noob at shell scripting. i was wondering if somebody could help me with my script.
i want the script to search the dev folder for the burner file
because they are different between distrubutions? as i under stand it.
this i the script.
#!/bin/bash
echo "Script för att bränna 360... (4 Replies)
ok the user can only enter a number if a letter is entered it shouldnt be accepted
This is what i have so far
read -p "How many cars to enter:" cars
until
do
read -p "Invalid number. Please re-enter:" $tags
done (5 Replies)
Hello
Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Hello,
I am new to awk and I am trying to figure out how to print an output based on user input.
For example:
ubuntu:~/scripts$ steps="step1, step2, step3"
ubuntu:~/scripts$ echo $steps
step1, step2, step3
I am playing around and I got this pattern that I want:
... (3 Replies)
Hi Experts,
path=/db/files/
format=$1
User can enter any file format.compare the user file format with actual file format existed in the directory /db/files. User enter all characters as "A" apart from date format.
example1: user will be entering the file format AAA_AA_YYYYMMDD.AAA
Actual... (6 Replies)
Hello All,
I have a file of ip addresses called activeips.txt
What I'm trying to do is run a simple bash script that has a loop in it. The loop is a cat of the IP addresses in the file.
The goal is to run 2 nmap commands to give me outputs where each address in the list has an OS... (11 Replies)
Discussion started by: Dirk_Pitt
11 Replies
LEARN ABOUT V7
sa
SA(1M)SA(1M)NAME
sa, accton - system accounting
SYNOPSIS
sa [ -abcjlnrstuv ] [ file ]
/etc/accton [ file ]
DESCRIPTION
With an argument naming an existing file, accton causes system accounting information for every process executed to be placed at the end of
the file. If no arguemnt is given, accounting is turned off.
Sa reports on, cleans up, and generally maintains accounting files.
Sa is able to condense the information in /usr/adm/acct into a summary file /usr/adm/savacct which contains a count of the number of times
each command was called and the time resources consumed. This condensation is desirable because on a large system acct can grow by 100
blocks per day. The summary file is read before the accounting file, so the reports include all available information.
If a file name is given as the last argument, that file will be treated as the accounting file; sha is the default. There are zillions of
options:
a Place all command names containing unprintable characters and those used only once under the name `***other.'
b Sort output by sum of user and system time divided by number of calls. Default sort is by sum of user and system times.
c Besides total user, system, and real time for each command print percentage of total time over all commands.
j Instead of total minutes time for each category, give seconds per call.
l Separate system and user time; normally they are combined.
m Print number of processes and number of CPU minutes for each user.
n Sort by number of calls.
r Reverse order of sort.
s Merge accounting file into summary file /usr/adm/savacct when done.
t For each command report ratio of real time to the sum of user and system times.
u Superseding all other flags, print for each command in the accounting file the user ID and command name.
v If the next character is a digit n, then type the name of each command used n times or fewer. Await a reply from the typewriter; if
it begins with `y', add the command to the category `**junk**.' This is used to strip out garbage.
FILES
/usr/adm/acct raw accounting
/usr/adm/savacct summary
/usr/adm/usracct per-user summary
SEE ALSO ac(1), acct(2)SA(1M)