04-07-2008
hi
$ cat > in6
E102|0|1-23-1994|0|12-5-1994|E003|A|charan,devupalli|2000
$ sed 's/|/,/g' in6 > out6.csv
$ cat out6.csv
E102,0,1-23-1994,0,12-5-1994,E003,A,charan,devupalli,2000
in the excel
in the excel i am getting charan and devupalli into two columns but i need to get in a single column like
charan,devupalli.....
thanks
cherry
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Dudes,
I want to replace \n with \r\n through out the file. For this I opened vi editor there tried with " s/\\n/\\r\\n/g ", with this I must be able to satisfy my requirements. But it is searching for the current line (Where cursor is). I need this for entire file. No problem if it is... (3 Replies)
Discussion started by: Chanakya.m
3 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I have a file with the following data.
E01011U, ,E11, , , ,0
E03012U, ,E14, , , ,0
E02013U, ,E25, , , ,0
I want to change it to
('E01-01-1-U','E11' );
('E03-01-2-U','E14' );
('E02-01-3-U','E25' );
Please let me know about it .Thanks in advance. (10 Replies)
Discussion started by: preethgideon
10 Replies
3. Shell Programming and Scripting
Ravi .
Pawan 19.23
sanjeeva .
I want to replace '.' into 'NULL' not the dot between 19.23 .. only single dots to NULL
how to do replacement after opening file in Vi (5 Replies)
Discussion started by: ravi.sadani19
5 Replies
4. Shell Programming and Scripting
Hi:
I want to write a Kshell script which will replace last / by |.
eg: /home/apps/test/document should be replaced as /home/apps/test|document.
The length of the string is not constant.
Thanks,
Ash (6 Replies)
Discussion started by: naikaa
6 Replies
5. Shell Programming and Scripting
Hi,
djfksdjk)))) kmmm jfdfjk))))
I want to replace the first ')' after kmmm with #.
The output would be djfksdjk)))) exists jfdfjk#)))
Can anyone help on this? (3 Replies)
Discussion started by: javeed7
3 Replies
6. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
7. Shell Programming and Scripting
Here is my file content
age=12
age=34
age=54
age=23
Hello world. This is the age result I am getting.
To day date is 23-02-2010.
From the above content I have to replace all the values after 'age=*' to age=24.
How to do it. (1 Reply)
Discussion started by: brahma
1 Replies
8. Shell Programming and Scripting
I need to replace dashes (i.e. -) if present from positions 351-357 with zero (i.e. 0), I also need to replace dash (i.e “-“) if present between position 024-043 with zero (i.e. 0) & I replace " " (i.e. 2 space characters) if present at position 381-382 with "04". Total length of record is 413.... (11 Replies)
Discussion started by: lancesunny
11 Replies
9. UNIX for Dummies Questions & Answers
I need to replace the (*) in the fist of a list with numbers using sed for example >
this file contain a list
* linux
* computers
* labs
* questions
to >>>>
this file contain a list
1. linux
2. computers
3. labs
4. questions (7 Replies)
Discussion started by: aalbazie
7 Replies
10. UNIX for Beginners Questions & Answers
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
LEARN ABOUT MOJAVE
curl_getdate
curl_getdate(3) libcurl Manual curl_getdate(3)
NAME
curl_getdate - Convert a date string to number of seconds
SYNOPSIS
#include <curl/curl.h>
time_t curl_getdate(char *datestring, time_t *now );
DESCRIPTION
curl_getdate(3) returns the number of seconds since the Epoch, January 1st 1970 00:00:00 in the UTC time zone, for the date and time that
the datestring parameter specifies. The now parameter is not used, pass a NULL there.
PARSING DATES AND TIMES
A "date" is a string containing several items separated by whitespace. The order of the items is immaterial. A date string may contain
many flavors of items:
calendar date items
Can be specified several ways. Month names can only be three-letter english abbreviations, numbers can be zero-prefixed and the
year may use 2 or 4 digits. Examples: 06 Nov 1994, 06-Nov-94 and Nov-94 6.
time of the day items
This string specifies the time on a given day. You must specify it with 6 digits with two colons: HH:MM:SS. To not include the time
in a date string, will make the function assume 00:00:00. Example: 18:19:21.
time zone items
Specifies international time zone. There are a few acronyms supported, but in general you should instead use the specific relative
time compared to UTC. Supported formats include: -1200, MST, +0100.
day of the week items
Specifies a day of the week. Days of the week may be spelled out in full (using english): `Sunday', `Monday', etc or they may be
abbreviated to their first three letters. This is usually not info that adds anything.
pure numbers
If a decimal number of the form YYYYMMDD appears, then YYYY is read as the year, MM as the month number and DD as the day of the
month, for the specified calendar date.
EXAMPLES
Sun, 06 Nov 1994 08:49:37 GMT
Sunday, 06-Nov-94 08:49:37 GMT
Sun Nov 6 08:49:37 1994
06 Nov 1994 08:49:37 GMT
06-Nov-94 08:49:37 GMT
Nov 6 08:49:37 1994
06 Nov 1994 08:49:37
06-Nov-94 08:49:37
1994 Nov 6 08:49:37
GMT 08:49:37 06-Nov-94 Sunday
94 6 Nov 08:49:37
1994 Nov 6
06-Nov-94
Sun Nov 6 94
1994.Nov.6
Sun/Nov/6/94/GMT
Sun, 06 Nov 1994 08:49:37 CET
06 Nov 1994 08:49:37 EST
Sun, 12 Sep 2004 15:05:58 -0700
Sat, 11 Sep 2004 21:32:11 +0200
20040912 15:05:58 -0700
20040911 +0200
STANDARDS
This parser was written to handle date formats specified in RFC 822 (including the update in RFC 1123) using time zone name or time zone
delta and RFC 850 (obsoleted by RFC 1036) and ANSI C's asctime() format. These formats are the only ones RFC 7231 says HTTP applications
may use.
RETURN VALUE
This function returns -1 when it fails to parse the date string. Otherwise it returns the number of seconds as described.
If the year is larger than 2037 on systems with 32 bit time_t, this function will return 0x7fffffff (since that is the largest possible
signed 32 bit number).
Having a 64 bit time_t is not a guarantee that dates beyond 03:14:07 UTC, January 19, 2038 will work fine. On systems with a 64 bit time_t
but with a crippled mktime(), curl_getdate(3) will return -1 in this case.
SEE ALSO
curl_easy_escape(3), curl_easy_unescape(3), CURLOPT_TIMECONDITION(3), CURLOPT_TIMEVALUE(3)
libcurl 7.54.0 February 03, 2016 curl_getdate(3)