Sponsored Content
Top Forums Shell Programming and Scripting Replacing the delimeter with other delimeter Post 302683019 by balajesuri on Tuesday 7th of August 2012 06:06:04 AM
Old 08-07-2012
Shorter:
Code:
perl -pe 's/\|\??/Ç/g' file2.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delimeter used in data

Blasted data inputters :mad: they always have to screw my data up....My comma delimited file with three fields ( firstname,surname and address ) has been screwed up by people entering addresses like this (putting a comma in between the house number and the street name) 142,Stonewall Avenue ... (8 Replies)
Discussion started by: hcclnoodles
8 Replies

2. Shell Programming and Scripting

Add Delimeter,

I want to add the delimiter in particular positions in one txt file. My file is : 123450000000000testing 898983920202020testfil . . . 1-5 -- after 5th position add , 6-10 -- after 10th position add , 11-7 -- like wise.. Expecting output is: 12345,0000000000,testing... (5 Replies)
Discussion started by: Jairaj
5 Replies

3. Shell Programming and Scripting

Handling Unit Seperator Delimeter

Hi, We have a file with a unit seperator as the delimeter. Here are the Sample lines from the file: ASIA/PACIFICHong KongFX2007071080900 ASIA/PACIFICHong KongFX2007071080900/ 800129HK This delimeter has the ascii value of \037. I have to... (4 Replies)
Discussion started by: sviswana
4 Replies

4. Shell Programming and Scripting

Count the delimeter from a file and delete the row if delimeter count doesnt match.

I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies

5. Shell Programming and Scripting

Attaching an end delimeter

Hi, I have a file below I want to attach an end delimeter '{}' after the time stamp input file 22113350444356|Status:Assigned,Notes: APP PRD |Sep 28 2011 12:12:55:660PM 22113350398356|Status:Assigned,Notes: APP PRD |Sep 28 2011 12:12:55:660AM 22113350621356|Status:Assigned,Notes:... (6 Replies)
Discussion started by: ratheeshjulk
6 Replies

6. Shell Programming and Scripting

missing comma delimeter in columns

hi if comma delimeter missing in columns treat them as bad file and if it is not then gudfiles. only checking columns not data. id,name,sal,deptno =======> gudfile 1,awa,200,10 2,aba,100,20 3,cdc,300,30 idname,sal,deptno ========> badfile since its missing (.)... (8 Replies)
Discussion started by: awais290
8 Replies

7. Shell Programming and Scripting

Put delimeter in data based on value

Hi Friends, I have a file as below source.txt 12345JackYKing32N 1235 JulyYoig 31N i am using cut command for cutting the fields cut -c 1-5 source.txt 12345 1235 like above i have to use each time to cut all the fieds manually. I have a file(pre.txt) which tells... (3 Replies)
Discussion started by: i150371485
3 Replies

8. Shell Programming and Scripting

awk substr delimeter

Hi All, I have an awk command that uses the substr function - At the moment I know the length of the values so can use the example below i.e substr(i,0,1) However in future these lengths may change so wondered if you can use a delimiter within a substr? Like in bash you could use cut -d ';',... (6 Replies)
Discussion started by: Ads89
6 Replies

9. Shell Programming and Scripting

Replace every second instance of delimeter

Hi, Need help on replacing every second instance of delimeter. Scenario: var="Name1,Value1,Name2,Value2,Name3,Value3,Name4,Value" I want every second "," to replace with "|" I tried like below echo $var| sed 's/,/|/2' But, it's not working. Expected output: ... (4 Replies)
Discussion started by: Sumanthsv
4 Replies

10. Shell Programming and Scripting

awk with tab delimeter

Hi Team below test file contains tab delimeter file and i am excepting the number of files 3. File : test.txt a b c awk -vFPAT='\t' -vOFS="\t" -v a="0" -v b="10" ' NR>a {if (NF != b ) print NR"@"NF }' test.txt current output is 1@2 required output is 1@3 Cloud you please help... (7 Replies)
Discussion started by: bmk123
7 Replies
XZDIFF(1)							     XZ Utils								 XZDIFF(1)

NAME
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files SYNOPSIS
xzcmp [cmp_options] file1 [file2] xzdiff [diff_options] file1 [file2] lzcmp [cmp_options] file1 [file2] lzdiff [diff_options] file1 [file2] DESCRIPTION
xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed directly to cmp or diff. If only one file is specified, then the files compared are file1 (which must have a suffix of a supported com- pression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they are uncom- pressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp or diff is preserved. The names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils. SEE ALSO
cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1) BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified. Tukaani 2009-07-05 XZDIFF(1)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy