Sponsored Content
Top Forums Shell Programming and Scripting How to replace and amend value in the same time Post 302302180 by lalelle on Monday 30th of March 2009 09:37:17 AM
Old 03-30-2009
How to replace and amend value in the same time

2009/03/30 08:11:34.553 DFP
2009/03/30 08:11:36.861 PLO

I want it to be

2009/03/30 09:11:34.553 DFP
2009/03/30 09:11:36.861 PLO

and
2009/03/30 23:11:34.553 DFP
2009/03/30 23:11:36.861 PLO

to be

2009/03/30 00:11:34.553 DFP
2009/03/30 00:11:36.861 PLO

Can we use sed or awk here? I don't know how.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to backup multiple files and amend their filenames

Hi, I'm trying to write a command that backs up certain files into my current directory and adds a prefix to the backed up file name. I realise this can be done in a script by specifying each individual file but would like to know if it can be done on one line and made an alias. I have the... (5 Replies)
Discussion started by: m223464
5 Replies

2. Shell Programming and Scripting

replace time format

Hello All, I have a problem with the following text file. For the field number 5 which is the time format (hh:mm:ss). But I would like to delete "ss" and showing hh:mm only. 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.155531,foold... (16 Replies)
Discussion started by: happyv
16 Replies

3. Solaris

Amend the size of a Partition Error

Hi guys, I'm fidling around Partition space on SMC and on changing partition size, or assiging an unused partition to "usr", or even trying to alter the disk layout I get: Attempted Format of Partition /dev/dsk/c1t0d0s3 failed with unexpected CIM error: CIM_ERR_FAILED:CIM_ERR_FAILED:... (2 Replies)
Discussion started by: drchris
2 Replies

4. Shell Programming and Scripting

amend ftp to sftp

Hi all, below is my current scriptftp -n << FTPCTRL open $my_ip user $my_user $my_pass ascii prompt off lcd $myDIR cd $ftp_cd $OPS $myfile FTPCTRLI'd like to amend it to sftp mode. Please advise the correct step.I consulted the man pages of sftp and I suppose I should be using the... (1 Reply)
Discussion started by: new2ss
1 Replies

5. UNIX for Advanced & Expert Users

Amend Unix hostname

Hi, Please could someone advise on the following if possible. I have built a unix server, and was given the wrong hostname. I need to amend the hostname to the correct name. And I don't want to rebuild the server again. I've tried the following to do change : hostname DTCT-TD3FIXI01A... (3 Replies)
Discussion started by: venhart
3 Replies

6. Shell Programming and Scripting

Amend File Without Changing Timestamp

Hi, Is it possible to amend a file without changing the last modified date? If it is, how do you do it? If it's not, is there a way to create an empty file with the same timestamp as another file? I know you can use touch -t yyyymmddhhmm.ss filename but, I would want the file to... (4 Replies)
Discussion started by: Ste_Moore01
4 Replies

7. 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
CPG_ZCB_FREE(2009-04-15)												  CPG_ZCB_FREE(2009-04-15)

NAME
cpg_zcb_free - Frees a zero copy buffer #include <corosync/cpg.h> int cpg_zcb_fre(cpg_handle_t handle, void *buffer); DESCRIPTION
The cpg_zcb_free function will free a zero copy buffer. The argument handle describes the handle on which the buffer will be allocated. The argument buffer is the zero copy buffer to free. RETURN VALUE
This call returns the CPG_OK value if successful, otherwise an error is returned. ERRORS
The errors are undocumented. SEE ALSO
cpg_overview(8), cpg_initialize(3), cpg_finalize(3), cpg_fd_get(3), cpg_dispatch(3), cpg_join(3), cpg_leave(3), cpg_mcast_joined(3), cpg_membership_get(3) cpg_zcb_alloc(3) cpg_zcb_free(3) cpg_zcb_mcast_joined(3) cpg_context_get(3) cpg_context_set(3) cpg_local_get(3) Corosync Cluster Engine Programmer's Manual corosync Man Page CPG_ZCB_FREE(2009-04-15)
All times are GMT -4. The time now is 03:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy