Thank you , I will check it out, but can you tell me what it does ?
Sorry. I thought it was pretty obvious. But, I see that I left in a debugging statement that probably confused things.
The corrected script is:
The first line sets up an array (c) that counts each occurrence of the timestamps in the first field of the file. (Normally, I would have used $0 here instead of $1, but your 1st line has trailing whitespace characters on the line.)
The rest of the lines execute once after the last line has been read from the input file. It creates a key (k) that is the hour, minute, and second for every second in a day (ignoring leap seconds) and if there was an entry in c for that time, it prints the time and the number of lines that had that time as the 1st field in the input file.
How do I get the number of seconds since 1970, within a script, for the previous day at 23:59? I need this value to pass into a sql statement to cleanup records older than the previous day at midnight. It will be automated via cron so no hard coding allowed.
Thanks! (2 Replies)
Hello everybody, how i can get how many lines are writed in a file in the last 5 seconds?
For ezample i have 'file1' that is filled by a process automatically and i neet to know how many lines with the word 'EXACTO' were filled the last 5 seconds, can somebody help me?
I try with:
tail -f... (16 Replies)
Hi All,
I need a script which does,
script check a file every 15 second, if file not exist, it will create a log file.
how can I do it ?
thanks
Alice (4 Replies)
Any sleek way to convert seconds to hh:mm:ss format .
I know it can be done by mod and divide . Looking for a one liner if possible .
Example
3600 seconds = 01:00:00
3601 seconds = 01:00:01 (2 Replies)
hi all UNIX Gurus,
this is my first post...so i posting this with great expectations:o...hoping to get the similar replies...
my question is....
need to get timestamp with millisecond in UNIX. Date command gives Year,month day, hour,minute and second but it does not give millisecond.
Any... (5 Replies)
Hi All
I need to convert a number of fields in a record from seconds to hh:mm:ss ( or possibly hhh:mm:ss ). I'm guessing awk is the way to go .
File has multiple records and each record contains 101 fields - can awk handle that ? The seconds values will be in fields 3 - 101 and could be 0.
... (4 Replies)
Hi,
In my shell script, (as per the requirement), I am creating few files, and the processes are launched parallelly . (by using "&" at the end of the command line). As per the logic, I need to remove these files as well, after creating.
But, the problem is, due to parallel processing,... (3 Replies)
Is there a function call in std library or unit command that returns the number of current leap seconds?
GG (4 Replies)
Discussion started by: NAVTime
4 Replies
LEARN ABOUT ULTRIX
ppmtosixel
ppmtosixel(1) General Commands Manual ppmtosixel(1)NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS -raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO ppm(5)AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)