Sponsored Content
Top Forums Shell Programming and Scripting Which one is faster to remove control m characters? Post 302085172 by cpmurray on Tuesday 15th of August 2006 09:53:30 PM
Old 08-15-2006
Try
perl -p -i -e 's/^M//g' ${INPUT_FILE}

This will do an inline edit of the file, if you wish to do every file in the directory
perl -p -i -e 's/^M//g' *

Regards
Craig Murray
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

printing control characters

using c-shell, does anyone know how to send control characters to the printer before the job? I need to set a printer to print in condensed mode HELP (1 Reply)
Discussion started by: mglinsk
1 Replies

2. UNIX for Dummies Questions & Answers

Remove control characters

Hi, When I do a man and save it into a file, I end up getting a lot of control characters. How can I remove them?? I tried this: /1,$ s/^H//g But I get an error saying "no previous regular expression". Can someone help me with this. Thanks, Aravind (5 Replies)
Discussion started by: aravind_mg
5 Replies

3. Shell Programming and Scripting

screen control characters

Hi, Can anyone help me with controlling the cursor position from a shell script. Things like moving left,right,up,down etc Anyone have any ideas? (2 Replies)
Discussion started by: ajcannon
2 Replies

4. Shell Programming and Scripting

Urgent : Control Characters

Can somebody please help me with the query. ? I want a part of program of which should look for control characters in the flat file , when it finds it, displaying message that Control Characters found..! Please help me (1 Reply)
Discussion started by: iamnoone
1 Replies

5. Shell Programming and Scripting

Control Characters

Can somebody please help me with the query. ? I want a part of program of which should look for control characters in the flat file , when it finds it, displaying message that Control Characters found..! Please help me (13 Replies)
Discussion started by: iamnoone
13 Replies

6. Shell Programming and Scripting

sed replacing specific characters and control characters by escaping

sed -e "s// /g" old.txt > new.txt While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies

7. Shell Programming and Scripting

Faster command to remove headers for files in a directory

Good evening Im new at unix shell scripting and im planning to script a shell that removes headers for about 120 files in a directory and each file contains about 200000 lines in average. i know i will loop files to process each one and ive found in this great forum different solutions... (5 Replies)
Discussion started by: alexcol
5 Replies

8. Shell Programming and Scripting

Request for advise on how to remove control characters in a UNIX file extracted from top command

Hi, Please excuse for posting new thread on control characters, I am facing some difficulties in removing the control character from a file extracted from top command, i am able to see control characters using more command and in vi mode, through cat control characters are not visible ... (8 Replies)
Discussion started by: karthikram
8 Replies

9. UNIX for Dummies Questions & Answers

Control characters in UNIX

Hi, My files are showing some control characters in vi editor ^M ^@ and somtimes ^H I removed ^M with %s/^M//g command but how to represent ^@ and ^H e.g. for ^M it is hold ctrl then v and m.. Please help.. I am very new to unix.. (7 Replies)
Discussion started by: prabhat.diwaker
7 Replies

10. Shell Programming and Scripting

Control Characters

Hallo Team, I am trying to get rid of the dollar sign. I managed to remove all the other special characters but i am struggling with this one. -bash-3.2$ cat -e missing_revenue_20141112.csv|less|head BW0522168531211141180935668@196.23.110.141$ BW092218784121114-370120610@196.23.110.141$... (4 Replies)
Discussion started by: kekanap
4 Replies
TM::Materialized::Stream(3pm)				User Contributed Perl Documentation			     TM::Materialized::Stream(3pm)

NAME
TM::Materialized::Stream - Topic Maps, abstract class for maps with stream based input/output drivers SYNOPSIS
# this class will never be directly used for instantiation # see the description in TM and individual low-level drivers (AsTMa, ...) DESCRIPTION
This class is a subclass of TM, so it implements map objects. It is abstract, though, as it only defined how a stream-based driver package should behave. It may thus be inherited by classes which implement external formats (TM::Materialized::AsTMa, TM::Materialized::XML, ....). INTERFACE
Constructor The constructor of implementations should expect a hash as parameter containing the field(s) from TM and one or more of the following: url: If given, then the instance will be read from this url whenever synced in. file: If given, then the data will be read/written from/to this file. This is just a convenience as it will be mapped to url. inline: If given, then the instance will be read directly from this text provided inline when synced. If several fields ("file", "url", "inline") are specified, it is undefined which one will be taken. Examples (using AsTMa): # opening from an AsTMa= file $atm = new TM::Materialized::AsTMa (file => 'here.atm'); # why need a file? files are evil, anyway $atm = new TM::Materialized::AsTMa (inline => '# this is AsTMa'); SEE ALSO
TM AUTHOR INFORMATION
Copyright 200[2-6], Robert Barta <drrho@cpan.org>, All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2008-04-10 TM::Materialized::Stream(3pm)
All times are GMT -4. The time now is 02:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy