[shell] removing ^M : Dos text to unix

tr -d '\015' < inputfile > outputfile

Detecting ^M (\r\n)

Note that “^M” is “Cntrl+V and Enter” Key

#!/bin/sh
 
if grep "^M" $1 > /dev/null
then
   echo $1 contains DOS Carriage Return
fi
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • MySpace
  • Reddit
  • Technorati
  • Twitter

My favorite listmania

Must Own PC Games-ALL TYPES

$16.89
Grand Theft Auto IV - I run this game on my laptop is clear as it comes on my xbox 360, with no choppiness. My laptop is $740, custom built with a 17" 1440x1024 display, NVIDIA GeForce 130M video card, and a Intel Core 2 D...
$19.99
BioShock - This game is huge.It goes on and on without repetition. Many unique weapons and upgrades. Wonderful story line. No wonder it was voted best first person shooter of the year.
$8.68
Dead Space - Hauntingly beautiful. Scary. Well-written. Thoughtful. These are words and phrases I would use to describe this game. I have not had this much fun playing a video game in 24 years.

First ...
$19.99
Left 4 Dead - This game is a blast and provides hours of fun. The best way to play it is online with some buddies.
$27.99
The Orange Box - The Orange Box is a great bundle for anyone who wants to put games on their computer, I have had a blast playing Team Fortress 2, and I have even gotten some time in on Half-Life 2 and Portal. However...
$49.50
Call of Duty 4: Modern Warfare - can only play in single player mode because the cd key had been used so much. Wish I would have paid extra 10 dollars for new game.
$25.77
Call of Duty: World at War - The game is great. To my surprise, the sound is also very good. I'm still trying to beat it so I can unlock zombie mode (the only reason I bought this game).
$8.49
Crysis - If you just want to play the game and are not computer savvy I'd say stay away from this game and this company (EA) because if something goes wrong with your install or it's anti-pirating software mes...
$15.62
Crysis Warhead - I've had zero problems with the DRM. All these spoiled teenagers are mad because they can't steal the game. This isn't anything like that UbiSoft StarForce DRM nightmare that actually damaged machines...
$16.38
Far Cry 2 - I waited for the price to go down and finally bought it. I have not done the online yet but I have enjoyed the single game itself.

I have finished it and playing it again and discovered ...
Gears of War - Gears of War (2007) DVD for PC: GOW is one the best games I have ever played. I originally played it (as well as GOW 2) on the Xbox 360, but sold my Xbox to get a PS3. I wanted to play GOW again and...
$13.45
Best Seller Series: Starcraft - This game is AWESOME. If you get this then if you go make a battle net account you can get the expansion for free. It's great
$7.49
Warhammer 40,000: Dawn of War - For fans of real time strategy games, this game is a must have. I have heard a lot about it, but just finally got around to getting it. There are always players online to get a game going with. The...
$1.77
Warhammer 40,000: Dawn of War -- Dark Crusade - Dark Crusade is a nice step in the Dawn of War series. The addition of a campaign map helps gamers get a command feel. I really enjoyed the mutiplayer maps my buddies and i have blown quite a few nigh...
$1.00
Far Cry - I love this game so much, the replay value is very high. I have finished this game about 6 to 7 times. It takes a LONG time to finish it. It's awesome that you can hide in the jungle and use the snipe...
$19.99
Hitman: Blood Money for PC - I am a big fan of the Hitman games, with Hitman 2 being one of top-10 favorite games of all time. So when I claim that Blood Money is the best Hitman yet, that's a big statement for me. The developers...
$89.96
F.E.A.R.: First Encounter Assault Recon - Fear was a good shooter with some creepy scares .... not much else.

There is almost no story development, in fact if the shooting was cut out the game would last 15 minutes.

...
$48.90
F.E.A.R. Extraction Point - Nobody, except maybe the developers, expects an expansion pack or sequel to be better than the original... in most cases, expansions fall far short of the original. "Extraction Point" is one of the ex...
$9.99
Battlefield 1942: The Complete Collection - The Airborne is worth the price of admission, the others were pretty much dated and didn't care for them, i didn't complete a play through on any of the rest. I am probably spoiled by the newer graphi...
$7.98
Battlefield 2 - I've been a fan of the Battlefield series for about 3 years now, and I must say, this is quite the gem. I never cared for Call of Duty thanks to the linear gameplay, and when I found this series I fel...
$14.75
Battlefield 2: Special Forces Expansion Pack - The Battlefield 2 series on PC is just one word - Outstanding! I still play the original with my buddies most evenings especially on weekends. After a hard days work there nothing better than shooting...
$22.99
Battlefield 2 Booster Pack Collection (Euro Force & Armored Fury) - On Sep 1st, 2009, both Euro Forces and Armored Fury will be included FREE for all BF2 players in September 2009 in a patch 1.50 from EA/DICE.
Doom Collector's Edition - totally an awsome game music sounds cool like the music in the snes version totally an awsome game.
if you guy wanted to play doom 1 and doom 2 then this game pack is for you
$6.99
Company of Heroes - GAME OVERVIEW
--------------------------------------------------------------------------------
THQ and Relic, the creative team behind Warhammer 40K: Dawn of War and The Outfit are back a...
$9.89
Company Of Heroes: Opposing Fronts - Company of Heroes is to this day my favorite RTS out there. The graphics are excellent, sound effects are top notch, and it's well balanced. What more could you ask for really. Check out the video re...
$19.99
Counter-Strike: Source - Exercise caution when buying this game used - a key accompanies this game that can only be registered with one steam account. Its a great game, but I had to return my copy because the key would not wo...
SWAT 4: Special Weapons and Tactics - One thing I didn't like was being penalized for shooting a fleeing armed suspect.Is this true for real cops?Otherwise a great game that should have had save checkpoints.
$9.98
Quake 4 - one of the standards, gotta have it if you like shooting things and being attacked by creatures
$28.95
Star Wars Jedi Knight 2: Jedi Outcast Collectors Edition - While the individual games are great, putting JK2, JK & the original DF together in a single bundle doesn't maximize your gaming experience. But first, a summary:

The games are part of a...
$9.49
Star Wars Jedi Knight: Jedi Academy - This product is tons of fun to play.The company from which I ordered was excellent,the game arrived earlier than amazon had estimated.
I highly reccommend this PC game.I own others in the Starwa...
$7.77
Max Payne - Great gameplay, the first game to incorporate "bullet time", very good storyline, incredibly compelling. The story and gameplay will keep you coming back for more. I had this game when I was younger...
$27.15
Max Payne 2: The Fall of Max Payne - I really like this game and of course the wife likes watching all the action in it. the one thing I dont care for though are all the game cut scenes. I prefer to be playing the game as to having to si...
$29.99
Tiger Woods PGA Tour 06 - This game has gotten so much better over the years. There is a new battle mode where you try to beat the best ever with your created character. But you had better have a lot of time on your hands. The...
  1. No comments yet.
(will not be published)
  1. No trackbacks yet.
Quick Coupons!
Abe's of Maine: Actually , if you buy a product more than $75, you can use FRIEND10 coupon code to get extra $10 off!