10-12-2015
Quote:
Originally Posted by
akabhinav18
but when I am creating .csv file I am getting all data in a single column while I want separate column for each field.
It might help you to know that "CSV" stands for "
comma separated value", not "
colon separated value". Replace the colon separators with comma (or semicolon) separators and Excel should have no problems separating the fields into separate cells.
You might want to read
RFC 4180 ("Common Format and MIME Type for Comma-Separated Values (CSV) Files") for more information about delimiter-separated file formats.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have this file which has the following contents:
,-0.3000 ,-0.3000 ,-0.3000
,-0.9000 ,-0.9000 ,-0.9000
i would like to get this:
-0.3-0.9-0.3-0.9-0.3-0.9
so far i am trying:
awk '{for(i=1; i<=NF; i++) {printf("%f\n",$i)}}' test1 > test2
any help... (4 Replies)
Discussion started by: npatwardhan
4 Replies
2. Shell Programming and Scripting
hi,
i have a text file that looks like this!
i want to generate an excel sheet out of it, removing all the junk data except the addresses
that look like
. Arrow Electrical Services
Rotating Machinery, Electrical Contracting & Mining Specialists
Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies
3. Shell Programming and Scripting
Hi all,
I need to find a way to convert excel file into csv or a text file in linux command. The reason is I have hundreds of files to convert. Another complication is the I need to delete the first 5 lines of the excel file before conversion.
so for instance
input.xls
description of... (6 Replies)
Discussion started by: johnkim0806
6 Replies
4. Shell Programming and Scripting
Hi,
Please help me on this.
I want to insert data from text file to excel using shell script
nawk -v r=4 -v c=4 -v val=$a -F, 'BEGIN{OFS=","}; NR != r; NR == r {$c = val; print}' "file.csv"
I used above one to insert $a value in 4th row, 4th column in an excel file.csv and it... (3 Replies)
Discussion started by: suman.frnz
3 Replies
5. Shell Programming and Scripting
Hi All,
I have the requirement in unix shell script.
I want to write the "ls -ltr" command out put to excel file as below.
Input :text file data :
drwxr-xr-x 5 root root 4096 Oct 2 12:26
drwxr-xr-x 2 apx aim 4096 Nov 29 18:40
drwxr-xr-x 5 root root 4096 Oct 2 12:26
drwxr-xr-x... (10 Replies)
Discussion started by: Balasankar
10 Replies
6. Shell Programming and Scripting
Hi All,
Is it possible to convert the excel file to PDF file(Without loosing any format) using unix shell scripting ??? If yes
Kindly help me on the code
Thanks in advance!!! (5 Replies)
Discussion started by: Balasankar
5 Replies
7. Shell Programming and Scripting
Hi,
I want to write a program to copy a log file to Excel sheet. Excel sheet has four columns MethodName , Code , Description, Details and Time.
I want to pick these info from text file and put it in excel sheet.
here is how the text file looks -
04.17.2014 08:06:12,697... (1 Reply)
Discussion started by: hershey
1 Replies
8. Shell Programming and Scripting
Dear Users , Need to convert delimited text files in UNix server to an Excel file and move the excel file to Windows environment. Am trying to automate the whole process. Can anyone share the ideas,if they have done similar ones before...Thanks -Meera (1 Reply)
Discussion started by: meerakrish
1 Replies
9. Shell Programming and Scripting
:cool:Hi, Iam new to this Scripts and forum too. Plz excuse if may i ask silly questions now and further..
Prob: i need to convert txt files data into excel sheet. Suppose if i have hour-wise data in txt file1 and file2 like
file1 file2
00: 140 00: 235
01: 160 01:415... (1 Reply)
Discussion started by: mrudula
1 Replies
10. UNIX for Beginners Questions & Answers
Hi
i have a problem in my job
i try to convert an excel file (xls extention) to text file (tab delimited), but no result with this comand
cat xxx.xls > xxx.txt
Do you have eny idea?
PS: sorry for my english
Thanks!! (4 Replies)
Discussion started by: frisso
4 Replies
LEARN ABOUT MOJAVE
regexp::common::uri::ftp
Regexp::Common::URI::ftp(3) User Contributed Perl Documentation Regexp::Common::URI::ftp(3)
NAME
Regexp::Common::URI::ftp -- Returns a pattern for FTP URIs.
SYNOPSIS
use Regexp::Common qw /URI/;
while (<>) {
/$RE{URI}{FTP}/ and print "Contains an FTP URI.
";
}
DESCRIPTION
$RE{URI}{FTP}{-type}{-password};
Returns a regex for FTP URIs. Note: FTP URIs are not formally defined. RFC 1738 defines FTP URLs, but parts of that RFC have been
obsoleted by RFC 2396. However, the differences between RFC 1738 and RFC 2396 are such that they aren't applicable straightforwardly to FTP
URIs.
There are two main problems:
Passwords.
RFC 1738 allowed an optional username and an optional password (separated by a colon) in the FTP URL. Hence, colons were not allowed in
either the username or the password. RFC 2396 strongly recommends passwords should not be used in URIs. It does allow for userinfo
instead. This userinfo part may contain colons, and hence contain more than one colon. The regexp returned follows the RFC 2396
specification, unless the {-password} option is given; then the regex allows for an optional username and password, separated by a
colon.
The ;type specifier.
RFC 1738 does not allow semi-colons in FTP path names, because a semi-colon is a reserved character for FTP URIs. The semi-colon is
used to separate the path from the option type specifier. However, in RFC 2396, paths consist of slash separated segments, and each
segment is a semi-colon separated group of parameters. Straigthforward application of RFC 2396 would mean that a trailing type
specifier couldn't be distinguished from the last segment of the path having a two parameters, the last one starting with type=.
Therefore we have opted to disallow a semi-colon in the path part of an FTP URI.
Furthermore, RFC 1738 allows three values for the type specifier, A, I and D (either upper case or lower case). However, the internet
draft about FTP URIs [DRAFT-FTP-URL] (which expired in May 1997) notes the lack of consistent implementation of the D parameter and
drops D from the set of possible values. We follow this practise; however, RFC 1738 behaviour can be archieved by using the -type =
"[ADIadi]"> parameter.
FTP URIs have the following syntax:
"ftp:" "//" [ userinfo "@" ] host [ ":" port ]
[ "/" path [ ";type=" value ]]
When using {-password}, we have the syntax:
"ftp:" "//" [ user [ ":" password ] "@" ] host [ ":" port ]
[ "/" path [ ";type=" value ]]
Under "{-keep}", the following are returned:
$1 The complete URI.
$2 The scheme.
$3 The userinfo, or if {-password} is used, the username.
$4 If {-password} is used, the password, else "undef".
$5 The hostname or IP address.
$6 The port number.
$7 The full path and type specification, including the leading slash.
$8 The full path and type specification, without the leading slash.
$9 The full path, without the type specification nor the leading slash.
$10 The value of the type specification.
REFERENCES
[DRAFT-URL-FTP]
Casey, James: A FTP URL Format. November 1996.
[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.
[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.
SEE ALSO
Regexp::Common::URI for other supported URIs.
AUTHOR
Damian Conway (damian@conway.org)
MAINTAINANCE
This package is maintained by Abigail (regexp-common@abigail.be).
BUGS AND IRRITATIONS
Bound to be plenty.
LICENSE and COPYRIGHT
This software is Copyright (c) 2001 - 2009, Damian Conway and Abigail.
This module is free software, and maybe used under any of the following licenses:
1) The Perl Artistic License. See the file COPYRIGHT.AL.
2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.
3) The BSD Licence. See the file COPYRIGHT.BSD.
4) The MIT Licence. See the file COPYRIGHT.MIT.
perl v5.18.2 2013-03-08 Regexp::Common::URI::ftp(3)