15961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# Copyright (c) 2001-2006, Cisco Systems, Inc. 25961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# All rights reserved. 35961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# 45961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# Redistribution and use in source and binary forms, with or without 55961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# modification, are permitted provided that the following conditions 65961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# are met: 75961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# 85961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# Redistributions of source code must retain the above copyright 95961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# notice, this list of conditions and the following disclaimer. 105961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# 115961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# Redistributions in binary form must reproduce the above 125961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# copyright notice, this list of conditions and the following 135961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# disclaimer in the documentation and/or other materials provided 145961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# with the distribution. 155961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# 165961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# Neither the name of the Cisco Systems, Inc. nor the names of its 175961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# contributors may be used to endorse or promote products derived 185961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# from this software without specific prior written permission. 195961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# 205961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 215961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 225961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 235961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 245961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 255961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 265961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 275961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 285961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 295961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 305961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 315961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com# OF THE POSSIBILITY OF SUCH DAMAGE. 325961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com 335961d8555973f660a94b77ffd7b9495291fbc874mallinath@google.com 346ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org#!/bin/sh 356ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org# 366ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org# usage: undos <file> 376ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org# 386ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org# strips CRs from a file - useful when moving DOS-created files 396ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org# onto UN*X machines 406ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org 416ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.orgcat $1 | tr -d "\r" > $1.tmp 426ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.orgmv $1.tmp $1 436ed0ee98e1c3d29a0ef79996f7d1abf174f39besergeyu@chromium.org 44