Hi jejemonx...
This is what vbe was referring to assuming you are using 'bash':
AND, an example of how it works:
As you can see whether you input variables 'b' and 'c' or not they have 'NULL' values so there will always be 3 variables.
You could always use 3 separate 'read's and check each one for validity and restart the loop as required if one or more is not a number...
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 SUNOS
timex
timex(1) User Commands timex(1)NAME
timex - time a command; report process data and system activity
SYNOPSIS
timex [-o] [ -p [-fhkmrt]] [-s] command
DESCRIPTION
The given command is executed; the elapsed time, user time and system time spent in execution are reported in seconds. Optionally, process
accounting data for the command and all its children can be listed or summarized, and total system activity during the execution interval
can be reported.
The output of timex is written on standard error.
OPTIONS
The following options are supported:
-o Report the total number of blocks read or written and total characters transferred by command and all its children. This option
works only if the process accounting software is installed.
-p List process accounting records for command and all its children. This option works only if the process accounting software is
installed. Suboptions f, h, k, m, r, and t modify the data items reported. The options are as follows:
-f Print the fork(2)/ exec(2) flag and system exit status columns in the output.
-h Instead of mean memory size, show the fraction of total available CPU time consumed by the process during its execution.
This ``hog factor'' is computed as (total CPU time)/(elapsed time).
-k Instead of memory size, show total kcore-minutes.
-m Show mean core size (the default).
-r Show CPU factor (user time/(system-time + user-time)).
-t Show separate system and user CPU times. The number of blocks read or written and the number of characters transferred
are always reported.
-s Report total system activity (not just that due to command) that occurred during the execution interval of command. All the data
items listed in sar(1) are reported.
EXAMPLES
Example 1: Examples of timex.
A simple example:
example% timex -ops sleep 60
A terminal session of arbitrary complexity can be measured by timing a sub-shell:
example% timex -opskmt sh
session commands
EOT
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWaccu |
+-----------------------------+-----------------------------+
SEE ALSO sar(1), time(1), exec(2), fork(2), times(2), attributes( 5)
NOTES
Process records associated with command are selected from the accounting file /var/adm/pacct by inference, since process genealogy is not
available. Background processes having the same user ID, terminal ID, and execution time window will be spuriously included.
SunOS 5.10 14 Sep 1992 timex(1)