Sponsored Content
Top Forums Shell Programming and Scripting Replacing text in a .csv file using Perl Post 302287420 by joeyg on Friday 13th of February 2009 03:56:27 PM
Old 02-13-2009
Hammer & Screwdriver Is this what you are trying?

Code:
> cat file170
"dlfkldfs flsdflk"      "dkfjdlfj"      "Jan 27, 2009 10:23 AM" ....
"dlfkldfs flsdflk"      "abcdefgh"      "Jan 28, 2009 10:23 AM" ....

> cat file170 | tr "\t" "," | tr -d '"'
dlfkldfs flsdflk,dkfjdlfj,Jan 27, 2009 10:23 AM,....
dlfkldfs flsdflk,abcdefgh,Jan 28, 2009 10:23 AM,....

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing commas with tilde in csv file.

hello all, i have a comma delimited file. i want to replace the commas in the file with the tilde symbol using sed. how can i do this? thanks. (4 Replies)
Discussion started by: femig
4 Replies

2. UNIX for Dummies Questions & Answers

Replacing characters in csv file

Hello all, This is my first post here, so please excuse me if this question is too obvious or has been asked before. I am new to Unix and although I tried to search your forum for the answer to my question, I could not find an answer that would help me. I have a 500MB csv file with numeric values... (1 Reply)
Discussion started by: finwhiz
1 Replies

3. Shell Programming and Scripting

Replacing strings in a log file and saves as a new csv

Hello Im new here.I need to replace strings and change it into csv format, or at least saves the file as csv if that would work :p. Heres an example of my scenario 1) I have a log file, named abc.log, and its like a txt based file anyway, and the content looks like this ... (2 Replies)
Discussion started by: tententen
2 Replies

4. Shell Programming and Scripting

Replacing strings in csv file.

Hi, I have a problem.. 1) I have a file that contains the lines as below : VRF-TM_DummyLab/mse02.lab,mse02.lab,ge-2/0/7.222 VRF-EMS_HUAWEI_MSAN_208/mse01.lab,mse01.lab,xe-1/0/0.208 2) I need a method to read this file, line by line from :... (5 Replies)
Discussion started by: msafwan82
5 Replies

5. Shell Programming and Scripting

selective replacing text using sed/perl

Hi, I have the following text which I want to search and replace using perl and sed. I would appreciate any help. Please notice the file contains schema name with a single dot and a double dot . &&WEBDIR_SCHEMA. and &&WEBDIR_SCHEMA .. } I would like to change it to the acutal schema... (5 Replies)
Discussion started by: jville
5 Replies

6. Shell Programming and Scripting

Format text to bold from perl script to csv

Hi everyone, is there any way in perl using which we can print the selective words in bold when we write the output to a csv file? Please find the example below 1. Filename: A 2. name age 12 3. city add 23 Line1 should only be bold. Outputs from other files being read in the... (2 Replies)
Discussion started by: ramakanth_burra
2 Replies

7. UNIX for Advanced & Expert Users

Replacing the comma in .csv file in unix

Hi All, Could some one help me on one of my requirement below: I have a sequential file with 4fields in it and it is a comma (,) seperated file. Delimeter is 'comma'. But in of the file column for ex: 3rd column it is 'Description' (column name) I am getting the values with commas.... (6 Replies)
Discussion started by: eskay_s
6 Replies

8. Shell Programming and Scripting

Replacing comma with in double quotes in a csv file

Hello, I need to read a csv file and I am trying to replace a comma with a text DSEE?DSEE. Example Input "Chapter","NewTrains, "oldTrains","Delayed",10,"London" "Chapter","Newbuses,oldbuses","On Time",20,"London" Output "Chapter","NewTrainsDSEE?DSEE... (5 Replies)
Discussion started by: venkatvani
5 Replies

9. Shell Programming and Scripting

Replacing text in Perl given by command line

Hi I need to write a Perl script that the file given as first argument of the command line that will find all occurrences of the string given as the third argument of the command line and replace with the string given as the fourth argument. Name newfound file is specified as the second... (3 Replies)
Discussion started by: nekoj
3 Replies

10. Shell Programming and Scripting

TEXT to CSV using Perl

Hi Folks Need some help with this and my Perl isnt the hottest I also have text::csv installed on my perl install The large text with a few million entries is in a format below example text file Fig Leafs Cake No: 0000001 Author: King s. Record No: 995-34343-232-232... (5 Replies)
Discussion started by: messiah1
5 Replies
FC-SCAN(1)																FC-SCAN(1)

NAME
fc-scan - scan font files or directories SYNOPSIS
fc-scan [ -Vbh ] [ [ -b ] [ --ignore-blanks ] ] [ [ -f format ] [ --format format ] ] [ --version ] [ --help ] file... DESCRIPTION
fc-scan scans file(s) recursively and prints out font pattern for each face found. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -b Ignore blanks to compute languages -f Format output according to the format specifier format. -V Show version of the program and exit. -h Show summary of options. file Scan file recursively for font faces. RETURN CODES
fc-scan returns error code 0 if at least one font was found or 1 otherwise. SEE ALSO
fc-query(1) FcFileScan(3) FcDirScan(3) FcPatternFormat(3) fc-cat(1) fc-cache(1) fc-list(1) fc-match(1) fc-pattern(1) The fontconfig user's guide, in HTML format: /usr/share/doc/fontconfig/fontconfig-user.html. AUTHOR
This manual page was updated by Behdad Esfahbod <behdad@behdad.org>. Jan 15, 2009 FC-SCAN(1)
All times are GMT -4. The time now is 03:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy