Sponsored Content
Top Forums Shell Programming and Scripting perl - Removing dots(".") from the data Post 302743153 by i150371485 on Wednesday 12th of December 2012 07:25:25 AM
Old 12-12-2012
@Pamu Thanks for the quick response . Again in the 5th field the dot is removing. I actually dont want to remove the "dots"(.) from text fields . I should only remove the "." from the Number fields .

Expected Output :

Code:
 
100000||1925-01-10|00:00|1862SHERMA NAVE#1SE.||EVTON|IL|60201||22509|BDSS|62007|2639|26670
100001||1935-01-10|00:00|1862NEW . YRK NO.||EVTON|IL|60201||22509|BDSS|62007|2639|26670
100002||1965-01-10|00:00|1862 IND . INC,CL .NAVE#1SE.||EVTON|IL|60201||22.509|BDSS|62007|2.639.|26670


Last edited by i150371485; 12-12-2012 at 08:31 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

removing the "\" and "\n" character using sed or tr

Hi All, I'm trying to write a ksh script to parse a file. When the "\" character is encountered, it should be removed and the next line should be concatenated with the current line. For example... this is a test line #1\ should be concatenated with line #2\ and line number 3 when this... (3 Replies)
Discussion started by: newbie_coder
3 Replies

3. Shell Programming and Scripting

show dots when script is "thinking"

Hey, I'm running the following script: #!/bin/bash kjv=kjv.txt trim(){ local trim_string local _TRIM=$1 trim_string=${_TRIM##*} _TRIM=${_TRIM#"trim_string"} echo $_TRIM } #trim() { # echo $( _trim "$@" ) #} printf "How many chapters? " read response (10 Replies)
Discussion started by: pkohn11
10 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Removing "^M" from the end of a String (i.e. "Ctrl+M")?

Hello All, I have an Expect script that ssh's to a remote server and runs some commands before exiting. One of the commands I run is the "hostname" Command. After I run this command I save the output using this line in the code below... Basically it executes the hostname command, then I... (2 Replies)
Discussion started by: mrm5102
2 Replies

6. Shell Programming and Scripting

Awk-sed - wc : how to count DOTS "."'s in a file.

Hi Experts , file: EST 2013::.................................................................................................................................................................................................................................................cmihx021:/home/data1/ ... (11 Replies)
Discussion started by: rveri
11 Replies

7. Shell Programming and Scripting

Perl scripting to get "Wanted Data"

I have data like below : Source file : input.txt ( so many data with same format ) 09.05.2014 09.49.52:359 RID:routerNode1@app1:1662306081,msisdn:787887225696,sid:93889095007001,tid:1405090902095648846024000,status:2,time:20140509094952,reason:DELIVRD,refund:null,status2:null ... (6 Replies)
Discussion started by: MacLing66
6 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
COMBINE(1)																COMBINE(1)

NAME
combine - combine sets of lines from two files using boolean operations SYNOPSIS
combine file1 and file2 combine file1 not file2 combine file1 or file2 combine file1 xor file2 _ file1 and file2 _ _ file1 not file2 _ _ file1 or file2 _ _ file1 xor file2 _ DESCRIPTION
combine combines the lines in two files. Depending on the boolean operation specified, the contents will be combined in different ways: and Outputs lines that are in file1 if they are also present in file2. not Outputs lines that are in file1 but not in file2. or Outputs lines that are in file1 or file2. xor Outputs lines that are in either file1 or file2, but not in both files. "-" can be specified for either file to read stdin for that file. The input files need not be sorted, and the lines are output in the order they occur in file1 (followed by the order they occur in file2 for the two "or" operations). Bear in mind that this means that the operations are not commutative; "a and b" will not necessarily be the same as "b and a". To obtain commutative behavior sort and uniq the result. Note that this program can be installed as "_" to allow for the syntactic sugar shown in the latter half of the synopsis (similar to the test/[ command). It is not currently installed as "_" by default, but you can alias it to that if you like. SEE ALSO
join(1) AUTHOR
Copyright 2006 by Joey Hess <joey@kitenet.net> Licensed under the GNU GPL. moreutils 2012-04-09 COMBINE(1)
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy