04-25-2007
HI,
Thanks for pointing out the mistake...
Try this one
awk -F, '{for(i=1;i<=NF;i++){if(i==6 || i==18){split($i,temp,":");printf("%s:%s,",temp[1],temp[2]);}else{printf("%s,",$i);}}printf("\n");}' file
Thanks
Raghuram
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI..
I have some files...when doing "ls -l" its like this..
-rwxr-xr-x 1 e2e e2e 747 Aug 30 15:18 abc.txt
how can I get the number YYYYMMDD from this...( since I need to compare this number with some other value..)
with the help of date/awk/sed/epoch or whatever u... (1 Reply)
Discussion started by: clx
1 Replies
2. Shell Programming and Scripting
how to grep 30 mins from starting time of script
let for example,script runs at 02:00am....i want to grep from 01.30 till 02:00
-------------------------------------------------------------------
how to achive this in a k-shell script ? (3 Replies)
Discussion started by: ali560045
3 Replies
3. Shell Programming and Scripting
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies
4. Shell Programming and Scripting
Hay guys,
I used time::local module. But i can't get my proper answer from this.
I want to extract two time for tomorrow start time and end time. In my code i just hard coded this. But it's not running for every day na. I need to create these time from any function or module.
my... (2 Replies)
Discussion started by: pritish.sas
2 Replies
5. Shell Programming and Scripting
I have a file which contains
1.3.6.1.4.1.637.61.1.35.10.19.1.10
1.3.6.1.4.1.637.61.1.35.15.3.1.4
Now i want to replace the last occurance of ".1." to ":"
The output should look like
1.3.6.1.4.1.637.61.1.35.10.19:10
1.3.6.1.4.1.637.61.1.35.15.3:4 (6 Replies)
Discussion started by: LavanyaP
6 Replies
6. Shell Programming and Scripting
Hello Guys.
I have copied the following from the time man pages
time -f "%E real,%U user,%S sys" ls -Fs
But I am getting
-f: command not found
Regards (3 Replies)
Discussion started by: fdc2suxs
3 Replies
7. HP-UX
Hello,
I have date format as shown in red color below
Fri, Sep 12, 2012 08:38:05 PM
Can anyone help me with command to change this format to yyyy-mm-dd and HH:MM:SS
Note: Time should be in 24 hours format
I really appreciate your help!!
Thanks,
Elavarasan (4 Replies)
Discussion started by: Elavarasan
4 Replies
8. Programming
Dear all,
I am kindly seeking assistance on the following issue.
I am working with data that is sampled every 0.05 hours (that is 3 minutes intervals) here is a sample data from the file
5.00000 15.5030
5.05000 15.6680
5.10000 16.0100
5.15000 16.3450
5.20000 16.7120
5.25000... (4 Replies)
Discussion started by: malandisa
4 Replies
9. Shell Programming and Scripting
Hi All,
I have one file which contains time for request and response.
I want to calculate time difference in milliseconds for each line.
This file can contain 10K lines.
Sample file with 4 lines.
for first line.
Request Time: 15:23:45,255
Response Time: 15:23:45,258
Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies
LEARN ABOUT FREEBSD
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)