Sponsored Content
Top Forums Shell Programming and Scripting How to fix file with more delimiter Post 302476996 by k_manimuthu on Friday 3rd of December 2010 03:17:55 AM
Old 12-03-2010
Code:
perl -ne 's/(([^,]+,\s+){2})([^,]+),/$1$3/; print ' input_file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

splitting file with more than one delimiter

Hi, I just wandering how to split a record which has more than one delimiter, i have a file which contains pattern as group separtor and ~ as field separtor, Ultimately I need consider even the groups as a field, So i need to make this multi-delimited file into ~ delimited file. My record... (4 Replies)
Discussion started by: braindrain
4 Replies

2. Shell Programming and Scripting

Substring based on delimiter, finding last delimiter

Hi, I have a string like ABC.123.XYZ-A1-B2-P1-C4. I want to delimit the string based on "-" and then get result as only two strings. One with string till last hyphen and other with value after last hyphen... For this case, it would be something like first string as "ABC.123.XYZ-A1-B2-P1" and... (6 Replies)
Discussion started by: gupt_ash
6 Replies

3. UNIX for Dummies Questions & Answers

How to change delimiter in my file ?

Hi I have a file in which delimiter is ';' However if the delimiter is within "" it is a part of the string and not delimiter. How to get the fields ? I want to replace the delimiter ';' to '|'. The file contains data like this : 11111; “2222 2222”; “3333; 3333”; “4444 ""44444” The file... (2 Replies)
Discussion started by: dashing201
2 Replies

4. Shell Programming and Scripting

Delimiter in output file

Hello, I am trying to find the record count in a specific folder, Here is the part of the code =========================== STARTDATE=`date +"%y%m%d%H%M"` for i in `ls *.DAT` do wc -l $i >> /XYZ/SrcFiles/"Record_counts"$STARTDATE.csv ... (2 Replies)
Discussion started by: Shanks
2 Replies

5. Shell Programming and Scripting

How to cut by delimiter, and delimiter can be anything except numbers?

Hi all, I have a number of strings like below: //mnt/autocor/43°13'(33")W/ and i'm trying to get the numbers in this string, for example 431333 please help thanks ahead (14 Replies)
Discussion started by: sunnydanniel
14 Replies

6. UNIX for Advanced & Expert Users

File Delimiter

Hi All, I woul like to know with out opening a file in unix ,how we can find out what is the delemeter in that file... Thanks.. edit by bakunin: changed thread title to "delimiter" so it can be found. (4 Replies)
Discussion started by: raju4u
4 Replies

7. Shell Programming and Scripting

Scripting to fix the issue in UNIX file having delimiter "|"

hello All, I am new user to shell scripting, kindly advise on the below? I have a file where i have gaps & the delimiter falls in next line and new line is also created , plz see the example :employee.txt Now the issue here is , i wan to write a script , where i can use "|" to get the... (6 Replies)
Discussion started by: sunnyd1
6 Replies

8. Shell Programming and Scripting

Shell script to put delimiter for a no delimiter variable length text file

Hi, I have a No Delimiter variable length text file with following schema - Column Name Data length Firstname 5 Lastname 5 age 3 phoneno1 10 phoneno2 10 phoneno3 10 sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies

9. UNIX for Dummies Questions & Answers

Getting the folder name and file name after delimiter

Hi, I have a input /dev/cm/test1.txt /qa/tm/hmkr/cc/test2.txt and I need an out like below foldername, filename /dev/cm/,test1.txt /qa/tm/hmkr/cc/,test2.txt I tried with awk $NF, but I'm getting the filenames and not folder names. Please let me know how to achive the above... (5 Replies)
Discussion started by: somu_june
5 Replies

10. Shell Programming and Scripting

Perl Code to change file delimiter (passed as argument) to bar delimiter

Hi, Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters. Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
TK_BRIEF(1)						      General Commands Manual						       TK_BRIEF(1)

 November 2000" "tk_Brief "

NAME
tk-Brief is a graphical user interface for writing single or multiple letters with latex. Even begginers are able to use it without a long time of learning. SYNOPSIS
tk_Brief [ -a an ] [ -N name ] [ -str street ] [ -o city ] [ -dir directory ] [ -fax faxnumber ] [ -h ] [ filename ] DESCRIPTION
tk_Brief generates a <filename>.tex file using a <filename>.text file and the input from the input fields. There are different letter styles inplemented, e.g. g-brief. Although it was originally written for the german letter norm, it can create an english or durch letter style. The labels can occur in English of Dutch language. tk_Brief is written in Tcl/Tk and therefor available on many platforms. OPTIONS
-h Short Help for tk_Brief. -a to Commandline option for 'to' field. -N name Commandline option for 'name field. -str street Commandline option dor 'street' field. -o city Commandline option for the 'city' field. -dir directory Starting directory. -fax faxnumber Commandline option for the 'faxnumber' field.. BUTTONS
Exit Exits tk_Brief and saves configurations in ${HOME}/.serienbrief Configuration Here are the senders and the layout for the letter style configured. Edit Text Using the external editor (default 'jed') edits the letter test and is saved in the file <filename>.text. Spell checking Using the configured spell checker (default 'ispell') <filename>.text is checked. TeX-file The LaTeXfile can be observed. Latex Compiling the File. Preview Compiling the file and viewing it with the configured viewer (default 'xdvi'). Print Compiling the file and printing it with the configured print command (default 'lpr -Plaser'). Multiple letters tk_Brief enteres multiple letter mode. Send fax Converting the file into g3 and send the fax using sendfax. Clear All temporary files are deleted. MULTIPLE LETTERS
In multiple letter mode input the addresses using 'Edit Addresses' in the following format: <to>;<name: >;<street>;<PLZ Ort>[;<opening>] <to>;<name: >;<street>;<PLZ city>[;<opening>] <to>;<name: >;<street>;<PLZ city>[;<opening>] <to>;<name: >;<street>;<PLZ city>[;<opening>] into the file <filename>.adresses. tk_Brief formats the addresses and saves them into <filename>.adr_ok. The <filename>.tex files are generated using the addresses. <opening> is optional. 'Preview' and 'Print' enters a warning mode because of the number of files. 'q' exits 'xdvi'. The next file is shown. For the later printing 'Generate PostScript' can be used. The PostScript files are numbered <filename><NR>.ps. REQUIREMENTS
g-brief pslatex tcl/tk FILES
$HOME/.serienbrief configuration file for tk_Brief <filename>.text letter text <filename>.tex generated LaTeXfile <filename>.adresses address file for multiple letters <filename>.adr_ok formatted address file for multiple letters SEE ALSO
LaTeX, dvips (1), ispell (1), lpr (1), sendfax (1), gs (1) LICENSE
Copyright (C) 1998 [Ralf Muller] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AUTHOR
Ralf Muller Ruppurrer StraBe 104 D-76137 Karlsruhe Email: ralf@krisralf.physik.uni-karlsruhe.de WWW: http://krisralf.physik.uni-karlsruhe.de/tk_Brief 13 TK_BRIEF(1)
All times are GMT -4. The time now is 02:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy