| Conversie de fisiere DOS to UNIX |
|
| Scris de Cypress | ||||||
| Thursday, 22 November 2007 | ||||||
|
#!/bin/bash ########################################################################## # Shellscript: dtox - DOS to UNIX text file conversion # Author : Heiner Steven < Aceasta adresa e-mail este protejata impotriva spamului, JavaScript trebuie activat pentru a putea vizualiza pagina. > # Category : File Conversion # SCCS-Id. : @(#) dtox 1.1 02/02/26 ########################################################################## # Description # Replaces "CR LF" sequences with "LF" end-of-line. # Does not handle DOS end-of-file character CTRL-Z (ASCII 26). ########################################################################## PN=`basename "$0"` # Program name VER='1.1' Usage () { echo >&2 "$PN - DOS to UNIX text file conversion, $VER usage: $PN file [file ...]" exit 1 } Msg () { for MsgLine do echo "$PN: $MsgLine" >&2 done } Fatal () { Msg "$@"; exit 1; } set -- `getopt h "$@"` || Usage [ $# -lt 1 ] && Usage # "getopt" detected an error while [ $# -gt 0 ] do case "$1" in # your flags here --) shift; break;; -h) Usage;; -*) Usage;; *) break;; # First file name esac shift done [ $# -lt 1 ] && Usage set -e # Terminate at first error for file do echo >&2 "$file" sed 's/ $//' < "$file" > tmp.$$ && mv tmp.$$ "$file" done
Only registered users can write comments! Powered by !JoomlaComment 3.12 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved. |
||||||



Debunking the Linux virus myth
Sa speram. Si daca ajunge acolo, sa sper...
Debunking the Linux virus myth
do I smell a frontpage
Debunking the Linux virus myth
Pagina e acolo, atat doar ca e un spatiu...
Un nou articol pe MYLRo.org
dar ce fel de vizite? conteaza sa ai tra...
Debunking the Linux virus myth
page not found
Un nou articol pe MYLRo.org
Articolul il scrisesem mai demult si l-a...
Debunking the Linux virus myth
Wohooo... 5661 de read-uri de ieri si 91...