WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Linux, UNIX, Open Source (http://www.wcm.at/forum/forumdisplay.php?f=13)
-   -   Dringend!!! Vi (http://www.wcm.at/forum/showthread.php?t=32802)

CM²S 11.10.2001 19:36

Dringend!!! Vi
 
Hallo liebe Leute!!!


wie mache ich versteckte steuerzeichen in eine Shellscript
sichtbar ?????
set ???

da ich eine CD von einem Windoof Würschtl bekommen habe
und alle textdateien ein ^M am ende jeder Zeile enthalten
und der vi sie aber nicht anzeigt.
die Shell aber sagt bad interpreter!!


Bitte hilfe Danke
Ciao
CM²S

_m3 11.10.2001 21:52

Nachfolgendes als shell-script ablegen und entprechend aufrufen:

Code:

#! /bin/sh
if [ ! "$1" ] ; then
        echo `basename $0` file ...
        echo '  convert' filenames from dos to unix
        exit 1
fi

while [ "$1" ] ; do
        TMP=$1.$$
        if tr -d '\r' <"$1" >"$TMP" ; then
                cp -a -f "$TMP" "$1"
        fi
        rm -f "$TMP"
        shift
done

HTH

CM²S 12.10.2001 01:30

DANKE
 
DANKE DANKE DANKE!!!!!
dos2unix kess!!!

DANKE DANKE DANKE!!!!!

ciao
CM²S


"Hoch lebe TUX"


Alle Zeitangaben in WEZ +2. Es ist jetzt 20:01 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag