Sponsored Content
Full Discussion: replace time format
Top Forums Shell Programming and Scripting replace time format Post 302115443 by ghostdog74 on Wednesday 25th of April 2007 12:19:21 AM
Old 04-25-2007
one way.
Code:
awk 'BEGIN {FS = "," ; OFS = ","} 
            { if (length($6) > 5) {
                        $6 = substr($6,1,length($6)-3) 
              }
              print $0 
            }' "file"

output:
Code:
 # ./test1.sh
00001,CLIENT,Company,1218,N,1:04,35,0.211,0,0.211,1.155531,0:00,0,0,0,0,0,1:04,35,0.211,0,0.211,1.15 5531,foold store,USD
00001,CLIENT,Company,1219,N,23:36,42,21.127,0,21.127,115.700959,0:00,0,0,0,0,0,23:36,42,21.127,0,21. 127,115.700959,food store,USD
00001,CLIENT,Company,1220,N,26:17,43,38.091,0,38.091,208.603457,0:00,0,0,0,0,0,26:17:00,43,38.091 ,0,38.091,208.603457,food store,USD
00001,CLIENT,Company,1221,N,27:35,111,33.775,0,33.775,184.967099,0:00,0,0,0,0,0,27:35:00,111,33.7 75,0,33.775,184.967099, food store, US$


Last edited by ghostdog74; 04-25-2007 at 01:31 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

time format..

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

help in time format

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

Convert Epoch time format to normal date time format in the same file

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

perl time format

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

Replace a format

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

time format

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

DATE and TIME format help in 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

Find gaps in time data and replace missing time value and column 2 value by interpolation in awk

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

Calculate Time diff in milli milliseconds(Time format : HH:MM:SS,NNN)

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
AZR3(1) 						      General Commands Manual							   AZR3(1)

NAME
azr3 - Organ synth with distortion and rotating speakers SYNOPSIS
azr3 --help azr3 --version azr3 [-a PORT|CLIENT] [-j NAME] [-m PORT|CLIENT] [-p NUMBER] DESCRIPTION
azr3 is a port of Rumpelrausch Taips' VST plugin AZR-3 which simulates a drawbar organ with a distorting amplifier and a rotating speaker cabinet. This version is a JACK client that can be connected to any other MIDI and audio software using JACK. -a, --audio-output=PORT|CLIENT When used, azr3 will try to connect its audio output ports to PORT (if it's a JACK port name) or the first two audio input ports in CLIENT (if it's a JACK client name). -h, --help Display a help text and exit. -j, --jack-name=NAME Set the name of the JACK client. The default is AZR-3. Note that JACK may change this name by e.g. adding a number at the end if needed. -m, --midi-input=PORT|CLIENT When used, azr3 will try to connect its MIDI input port to PORT (if it's a JACK port name) or the first MIDI output port in CLIENT (if it's a JACK client name). -p, --preset=NUMBER Load the preset with the given number instead of the first available one. -v, --version Display version information and exit. All program options can also be set using environment variables. The variable names are the same as the long option names with all letters in upper case, all - changed to _ and the prefix AZR3_JACK_ added. Command line options override environment variables. AUTHOR
The original VST version was written by Philipp Mott, this JACK port by Lars Luthman. This manual page was written by Lars Luthman <lars.luthman@gmail.com>. February 24, 2010 AZR3(1)
All times are GMT -4. The time now is 02:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy