Sponsored Content
Top Forums Shell Programming and Scripting Date format change in a csv file Post 302948999 by Aia on Sunday 5th of July 2015 07:55:17 PM
Old 07-05-2015
Don,

I do accept you have the right to interpret the rules as it suits you and when it suits you, as moderator. But I have not denigrated any user. Smiling Dragon made a comment I thought it was too hard on himself/herself, and I responded with my sincere opinion that I thought it was valuable his/her contribution. Of course, a smart-ass innuendo remark had it to be made about my chosen word "crippled".
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to change the date format in a file

i have many files with date format of 6-9-2008 and i want a script that can change the format to 2008-06-09 Thanks (15 Replies)
Discussion started by: shehzad_m
15 Replies

2. Shell Programming and Scripting

Format a date in a csv file

So I have a csv file where the 3rd field is a date string in the format yyyy-mm-dd. I need to change it to mm/dd/yyyy. So each line in the csv file looks like: StringData,StringData,2009-02-17,12.345,StringData StringData,StringData,2009-02-16,65.789,StringData Any idea how I can keep... (5 Replies)
Discussion started by: rpiller
5 Replies

3. Shell Programming and Scripting

How to change date format in file

Hello! I have a textfile that look like this: "83d1:46:2b";"20091008190000";"Rögle BK - Skellefteå";"Swedish" "d4c:46:21";"20091008190000";"Södertälje - Brynäs";"Swedish" "d4b:46:2";"20091008190000";"HV 71 - Färjestad";"Swedish" "838:46:b";"20091010160000";"Skellefteå - HV 71";"Swedish"... (2 Replies)
Discussion started by: condmaster
2 Replies

4. Shell Programming and Scripting

File date format how to change

Hi All, Below are the unix files taken by the help of ls -lrt -rw-r--r-- 1 kbehera Domain Users 293 Jul 27 13:33 sand.txt -rw-r--r-- 1 kbehera Domain Users 4 Jul 27 13:37 sand1.txt -rw-r--r-- 1 kbehera Domain Users 293 Jul 27 15:30 new_sand.txt -rw-r--r-- 1 kbehera Domain Users 0 Jul 27... (2 Replies)
Discussion started by: krupasindhu18
2 Replies

5. Shell Programming and Scripting

Changing date format in CSV file

I have a CSV file with a date format like this; 11/19/2012 17:37:00,1.372,121.6 11/19/2012 17:38:00,0.743,121.6 Want to change the time stamp to seconds after 1970 so I can get the data in rrdtool. For anyone interested, this is data from a TED5000 unit and is Kwatts and volts. Needs to... (3 Replies)
Discussion started by: ottsm
3 Replies

6. Shell Programming and Scripting

How to change the format of the date column in a flat file?

Hi, i have a flat file namely temp.txt with this data below ID|name|contact_date 101|Kay|2013-12-26 102|let|2013-12-26 I need to modify the date data in the flat file into MM/DD/YYYY HH24:MI:SS format let me know the code for this. Thank you! (5 Replies)
Discussion started by: srikanth_sagi
5 Replies

7. Shell Programming and Scripting

Datestamp format 2nd change in csv file (awk or sed)

I have a csv file formatted like this: 2014-08-21 18:06:26,A,B,12345,123,C,1232,26/08/14 18:07and I'm trying to change it to MM/DD/YYYY HH:MM for both occurances. I have got this: awk -F, 'NR <=1 {print;next}{"date +%d/%m/%Y\" \"%H:%m -d\""$1 "\""| getline dte;$1=dte}1' OFS="," test.csvThis... (6 Replies)
Discussion started by: say170
6 Replies

8. Shell Programming and Scripting

Need to change date format in a csv file using awk

Example: Input csv file 00245DLS,Sitel Ocala,12/31/2014,18:45,1.00,7.00,0.00,0.00 00245DLS,Sitel Ocala,12/31/2014,19:00,-1.00,-1.00,-1.00,-1.00 00245HB,Charlotte,01/01/2015,00:00,-1.00,-1.00,-1.00,0.00 Output csv file 00245DLS,Sitel Ocala,2014/12/31,18:45,1.00,7.00,0.00,0.00 00245DLS,Sitel... (8 Replies)
Discussion started by: adit
8 Replies

9. Shell Programming and Scripting

Change date format in am/pm in csv files using UNIX

Hi All, I'm new to forum good to hear all. I stuck in converting date format in csv file using unix csv file contains as below ,750,0000000000000000GCJR, ,06/22/2016 14:48:44 I want to convert into as below ,750,0000000000000000GCJR, ,06/22/2016 02:48:44 PM Please reply asap..... (22 Replies)
Discussion started by: Raghureds
22 Replies

10. UNIX for Beginners Questions & Answers

Change date format in a file.

Hi all, I have a file as below, i would like the change the format of the time from "11/7/2019 20:12" to "2019-07-11 20:12:00" in the last coloumn. any awk solution on this. Input: 2,0,695016,1961612,497212,5800804,0,0,161,33,7605,12226,23,10,66,0,0,34,11/7/2019 20:10... (4 Replies)
Discussion started by: Raghuram717
4 Replies
rexec(3SOCKET)						     Sockets Library Functions						    rexec(3SOCKET)

NAME
rexec, rexec_af - return stream to a remote command SYNOPSIS
cc [ flag ... ] file... -lsocket -lnsl [ library... ] #include <netdb.h> #include <unistd.h> int rexec(char **ahost, unsigned short inport, const char *user, const char *passwd, const char *cmd, int *fd2p); int rexec_af(char **ahost, unsigned short inport, const char *user, const char *passwd, const char *cmd, int *fd2p, int af); DESCRIPTION
The rexec() and rexec_af() functions look up the host ahost using getaddrinfo(3SOCKET) and return -1 if the host does not exist. Otherwise ahost is set to the standard name of the host. The username and password are used in remote host authentication. When a username and pass- word are not specified, the .netrc file in the user's home directory is searched for the appropriate information. If the search fails, the user is prompted for the information. The rexec() function always returns a socket of the AF_INET address family. The rexec_af() function supports AF_INET, AF_INET6, or AF_UNSPEC for the address family. An application can choose which type of socket is returned by passing AF_INET or AF_INET6 as the address family. The use of AF_UNSPEC means that the caller will accept any address family. Choosing AF_UNSPEC provides a socket that best suits the connectivity to the remote host. The port inport specifies which DARPA Internet port to use for the connection. The port number used must be in network byte order, as sup- plied by a call to htons(3XNET). The protocol for connection is described in detail in in.rexecd(1M). If the call succeeds, a socket of type SOCK_STREAM is returned to the caller, and given to the remote command as its standard input and standard output. If fd2p is non-zero, an auxiliary channel to a control process is set up and a file descriptor for it is placed in *fd2p. The control process returns diagnostic output (file descriptor 2), from the command on the auxiliary channel. The control process also accepts bytes on this channel as signal numbers to be forwarded to the process group of the command. If fd2p is 0, the standard error (file descriptor 2) of the remote command is made the same as its standard output. No provision is made for sending arbitrary signals to the remote process, other than possibly sending out-of-band data. There is no way to specify options to the socket() call made by the rexec() or rexec_af()functions. RETURN VALUES
If rexec() succeeds, a file descriptor number is returned of the socket type SOCK_STREAM and the address family AF_INET. The parameter *ahost is set to the standard name of the host. If the value of fd2p is other than NULL, a file descriptor number is placed in *fd2p which represents the standard error stream of the command. If rexec_af() succeeds, the routine returns a file descriptor number of the socket type SOCK_STREAM in the address family AF_INET or AF_INET6, as determined by the value of the af parameter. If either rexec() or rexec_af() fails, -1 is returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ This interface is Unsafe in multithreaded applications. Unsafe interfaces should be called only from the main thread. SEE ALSO
in.rexecd(1M), getaddrinfo(3SOCKET), gethostbyname(3NSL), getservbyname(3SOCKET), htonl(3XNET), socket(3SOCKET), attributes(5) SunOS 5.11 10 Feb 2004 rexec(3SOCKET)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy