09-27-2007
Could anyone let me know if
SCH=12:34,23:12,11:20... N numbers
How can I print like below
12:34
23:12
11:20
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi need help here, a bit of code im doing requires a number to be enetered i have got validation and loop if its outside a ceratain range, but was wondering what code i need to validate if a character has been entered. cheers (3 Replies)
Discussion started by: ruffenator
3 Replies
2. Shell Programming and Scripting
Hello all,
I am having problem in writing a if condition for the following:
I have a file Instance.dat which has:
#Server Environment
server1 dev
server2 dev
server3 sit
#!/bin/ksh
ENV=dev
for i in $( cat Instances.dat | grep -v '#' |awk {'print $2'} )
do
if ]... (7 Replies)
Discussion started by: chiru_h
7 Replies
3. Shell Programming and Scripting
Dear guru's,
I am learning shellscripting and now I 'm struggeling with this problem:
When the number in the left column is equal or higer then 200, I want to send an email to "postmaster" @ the corresponding domain in the right column.
220 shoes.com
217 dishwashers.net
209 ... (11 Replies)
Discussion started by: algernonz
11 Replies
4. Shell Programming and Scripting
hi
I need a simple script to do the following.
I need to check the user input for
1. quad dotted notation.
2. check that all of the inputs are numeric and within 1-255 range.
Could someone please help me?
I tried to use egrep to check for dotted notation.
quad=1.1.1.12
... (5 Replies)
Discussion started by: sabina
5 Replies
5. Shell Programming and Scripting
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)
Discussion started by: DDoS
9 Replies
6. Shell Programming and Scripting
Hi,
i am trying to validate 2 variables and then subtract, the following code works well in AiX but when i try in Solaris it doesnt work.
((TIME1>TIME2)) && ((TIME2=TIME2+864))
((DIF=TIME2-TIME1))
echo difference = $DIF Seconds
is there any way the validation can be done using... (2 Replies)
Discussion started by: Shellslave
2 Replies
7. Shell Programming and Scripting
How do we validate the header file. The file number should increament by 1 (position 17 to 19) if not abend the process.
first week
ABC0001 20100101123
second week
ABC0001 20100108124
Third week
ABC0001 20100115125 (7 Replies)
Discussion started by: zooby
7 Replies
8. Shell Programming and Scripting
I have a table that looks like this, but for a whole year:
Hourly weather history for XXX 7 Jun
0:00 Clear weather 28
1:00 Clear weather 23
2:00 Clear weather 21
3:00 Clear weather 22
4:00 Clear weather 22
5:00 Clear weather 22
6:00 Clear weather 23
7:00 Clear... (12 Replies)
Discussion started by: paulyester
12 Replies
9. Shell Programming and Scripting
How to validate the user supplied timestamp?
Ther requirement is as follows.
While invoking the script, the parameters passed to the script are minimum and maixmum timestamps.
let's say min_tstmp and max_tstmp
ksh abc.ksh 2011-09-01-00:00:00 2011-12-01-00:00:00
so... (3 Replies)
Discussion started by: kmanivan82
3 Replies
10. Shell Programming and Scripting
Hi Guys,
Im a newbie to scripting and have a small assignment. can someone please confirm if the script i have written would work fine as we dont have a test server to test :(
Scenario - copy 2 files from an ftp server (windows) to a linux machine (a perticular folder). run 2 different... (0 Replies)
Discussion started by: nishantvshah
0 Replies
LEARN ABOUT MOJAVE
iosnoop
iosnoop(1m) USER COMMANDS iosnoop(1m)
NAME
iosnoop - snoop I/O events as they occur. Uses DTrace.
SYNOPSIS
iosnoop [-a|-A|-Deghinostv] [-d device] [-f filename] [-m mount_point] [-n name] [-p PID]
DESCRIPTION
iosnoop prints I/O events as they happen, with useful details such as UID, PID, block number, size, filename, etc.
This is useful to determine the process responsible for using the disks, as well as details on what activity the process is requesting. Be-
haviour such as random or sequential I/O can be observed by reading the block numbers.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS
-a print all data
-A dump all data, space delimited
-D print time delta, us (elapsed)
-e print device name
-i print device instance
-N print major and minor numbers
-o print disk delta time, us
-s print start time, us
-t print completion time, us
-v print completion time, string
-d device
instance name to snoop (eg, dad0)
-f filename
full pathname of file to snoop
-m mount_point
mountpoint for filesystem to snoop
-n name
process name
-p PID process ID
EXAMPLES
Default output, print I/O activity as it occurs,
# iosnoop
Print human readable timestamps,
# iosnoop -v
Print major and minor numbers,
# iosnoop -N
Snoop events on the root filesystem only,
# iosnoop -m /
FIELDS
UID User ID
PID Process ID
PPID Parent Process ID
COMM command name for the process
ARGS argument listing for the process
SIZE size of the operation, bytes
BLOCK disk block for the operation (location. relative to this filesystem. more useful with the -N option to print major and minor num-
bers)
STIME timestamp for the disk request, us
TIME timestamp for the disk completion, us
DELTA elapsed time from request to completion, us (this is the elapsed time from the disk request (strategy) to the disk completion
(iodone))
DTIME time for disk to complete request, us (this is the time for the disk to complete that event since it's last event (time between
iodones), or, the time to the strategy if the disk had been idle)
STRTIME
timestamp for the disk completion, string
DEVICE device name
INS device instance number
D direction, Read or Write
MOUNT mount point
FILE filename (basename) for I/O operation
NOTES
When filtering on PID or process name, be aware that poor disk event times may be due to events that have been filtered away, for example
another process that may be seeking the disk heads elsewhere.
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
iosnoop will run forever until Ctrl-C is hit.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
iotop(1M), dtrace(1M)
version 1.50 Jul 25, 2005 iosnoop(1m)