Sponsored Content
Top Forums Shell Programming and Scripting Removing special characters in file Post 302155172 by tellyons on Thursday 3rd of January 2008 04:38:06 AM
Old 01-03-2008
Came in handy for me...Thanks!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

removing special characters @ EOL

How to remove special chracters @ END OF EACH LINE in a file file1.txt: 0003073413^M 0003073351^M 0003073379^M 0003282724^M 0003323334^M 0003217159^M 0003102760^M 0002228911^M I used the below command but it is not working ? perl -pi -e 's/^M\/g' file1.txt (6 Replies)
Discussion started by: ali560045
6 Replies

2. AIX

Removing a filename which has special characters passed from a pipe with xargs

Hi, On AIX 5200-07-00 I have a find command as following to delete files from a certain location that are more than 7 days old. I am being told that I cannot use -exec option to delete files from these directories. Having said that I am more curious to know how this can be done. an sample... (3 Replies)
Discussion started by: jerardfjay
3 Replies

3. Solaris

removing special characters, white spaces from a field in a file

what my code is doing, it is executing a sql file and the resullset of the query is getting stored in the text file in a fixed format. for that fixed format i have used the following code:: Code: awk -F":"... (2 Replies)
Discussion started by: priyanka3006
2 Replies

4. Shell Programming and Scripting

Removing special characters

Dear Friends, I want to remove text between two patters. Problem is, it has random special characters like \ / | * ` ~ ! $ etc. These random special characters has no fixed length. But these special characters are appearing between a fixed pattern e.g. DM&^%#|#!\/?CT Expected output... (14 Replies)
Discussion started by: anushree.a
14 Replies

5. Shell Programming and Scripting

Removing Special Character from File.

Hi, My file has this special character "^M" I would like to remove this characters. eg: abc,abc,^M i tried using sed but doesnt work. i used octal dump command to see special character it returns following: 015 \r Appreciate your reply. (6 Replies)
Discussion started by: pinnacle
6 Replies

6. UNIX for Dummies Questions & Answers

awk for removing special characters and extra commas

Hi, I have a .csv file which as empty lines with comma and some special characters in 3rd column as below. Source data 1,2,3,4,%#,6 ,,,,,, 1,2,3,4,5,6 Target Data 1,2,3,4,5,6I need to remove blank lines and special charcters I am trying to get this using the below awk awk -F","... (2 Replies)
Discussion started by: shruthidwh
2 Replies

7. Shell Programming and Scripting

Removing special characters - Control M

I have developed a small script to remove the Control M characters that get embedded when we move any file from Windows to Unix. For some reason, its not working in all scenarios. Some times I still see the ^M not being removed. Is there anything missing in the script: cd ${inputDir}... (7 Replies)
Discussion started by: vskr72
7 Replies

8. Shell Programming and Scripting

File containing special characters

Hello All, I am facing challenges in order to transfer a file from windows to unix box,the file contains a special character '×' ,now when I am transferring the file from windows to unix that special character converted to something else like 'Ã' ,another thing I have noticed that the hardware is... (1 Reply)
Discussion started by: prarat
1 Replies

9. Linux

File conversion and removing special characters from a file in Linux

I have a .CSV file when I check for the special characters in the file using the command cat -vet filename.csv, i get very lengthy lines with "^@", "^I^@" and "^@^M" characters in between each alphabet in all of the records. Using the code below file filename.csv I get the output as I have a... (2 Replies)
Discussion started by: dhruuv369
2 Replies

10. Shell Programming and Scripting

Removing blank/white spaces and special characters

Hello All , 1. I am trying to do a task where I need to remove Blank spaces from my file , I am usingawk '{$1=$1}{print}' file>file1Input :- ;05/12/1990 ;31/03/2014 ; Output:- ;05/12/1990 ;31/03/2014 ;This command is not removing all spaces from... (6 Replies)
Discussion started by: himanshu sood
6 Replies
Imager::Matrix2d(3pm)					User Contributed Perl Documentation				     Imager::Matrix2d(3pm)

NAME
Imager::Matrix2d - simple wrapper for matrix construction SYNOPSIS
use Imager::Matrix2d; $m1 = Imager::Matrix2d->identity; $m2 = Imager::Matrix2d->rotate(radians=>$angle, x=>$cx, y=>$cy); $m3 = Imager::Matrix2d->translate(x=>$dx, y=>$dy); $m4 = Imager::Matrix2d->shear(x=>$sx, y=>$sy); $m5 = Imager::Matrix2d->reflect(axis=>$axis); $m6 = Imager::Matrix2d->scale(x=>$xratio, y=>$yratio); $m8 = Imager::Matric2d->matrix($v11, $v12, $v13, $v21, $v22, $v23, $v31, $v32, $v33); $m6 = $m1 * $m2; $m7 = $m1 + $m2; use Imager::Matrix2d qw(:handy); # various m2d_* functions imported # where m2d_(.*) calls Imager::Matrix2d->$1() DESCRIPTION
This class provides a simple wrapper around a reference to an array of 9 co-efficients, treated as a matrix: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] Most of the methods in this class are constructors. The others are overloaded operators. Note that since Imager represents images with y increasing from top to bottom, rotation angles are clockwise, rather than counter- clockwise. identity() Returns the identity matrix. rotate(radians=>$angle) rotate(degrees=>$angle) Creates a matrix that rotates around the origin, or around the point (x,y) if the 'x' and 'y' parameters are provided. translate(x=>$dx, y=>$dy) translate(x=>$dx) translate(y=>$dy) Translates by the specify amounts. shear(x=>$sx, y=>$sy) shear(x=>$sx) shear(y=>$sy) Shear by the given amounts. reflect(axis=>$axis) Reflect around the given axis, either 'x' or 'y'. reflect(radians=>$angle) reflect(degrees=>$angle) Reflect around a line drawn at the given angle from the origin. scale(x=>$xratio, y=>$yratio) Scales at the given ratios. You can also specify a center for the scaling with the "cx" and "cy" parameters. matrix($v11, $v12, $v13, $v21, $v22, $v23, $v31, $v32, $v33) Create a matrix with custom co-efficients. _mult() Implements the overloaded '*' operator. Internal use. Currently both the left and right-hand sides of the operator must be an Imager::Matrix2d. _add() Implements the overloaded binary '+' operator. Currently both the left and right sides of the operator must be Imager::Matrix2d objects. _string() Implements the overloaded stringification operator. This returns a string containing 3 lines of text with no terminating newline. I tried to make it fairly nicely formatted. You might disagree :) _eq Implement the overloaded equality operator. Provided for older perls that don't handle magic auto generation of eq from "". The following functions are shortcuts to the various constructors. These are not methods. You can import these methods with: use Imager::Matrix2d ':handy'; m2d_identity m2d_rotate() m2d_translate() m2d_shear() m2d_reflect() m2d_scale() AUTHOR
Tony Cook <tony@develop-help.com> BUGS
Needs a way to invert a matrix. SEE ALSO
Imager(3), Imager::Font(3) http://imager.perl.org/ perl v5.14.2 2011-11-25 Imager::Matrix2d(3pm)
All times are GMT -4. The time now is 04:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy