2015-11-07T10:41:15ZFluxBBhttps://debian-facile.org/viewtopic.php?id=12556]]>https://debian-facile.org/profile.php?id=38462015-11-07T10:41:15Zhttps://debian-facile.org/viewtopic.php?pid=145471#p145471 Bon, il fallait trouver que le paquet dos2unix était nécessaire. Merci !]]>https://debian-facile.org/profile.php?id=38462015-11-07T08:33:00Zhttps://debian-facile.org/viewtopic.php?pid=145438#p145438]]>https://debian-facile.org/profile.php?id=44552015-11-06T19:28:57Zhttps://debian-facile.org/viewtopic.php?pid=145413#p145413
smolski a écrit :
je comprends pas le second problème... Si c'est différent, ouvre un nouveau post, ce sera plus clair.
Mais non, il n'y a qu'un problème, c'est Mac -> Unix. \r = CR \n = LF]]>
https://debian-facile.org/profile.php?id=38462015-11-06T15:53:53Zhttps://debian-facile.org/viewtopic.php?pid=145319#p145319Si c'est différent, ouvre un nouveau post, ce sera plus clair. ]]>https://debian-facile.org/profile.php?id=7162015-11-06T15:52:43Zhttps://debian-facile.org/viewtopic.php?pid=145318#p145318http://www.debianaddict.org/article12.html Ici, on à affaire à un simple \r et je voudrais le remplacer par un \n.]]>https://debian-facile.org/profile.php?id=38462015-11-06T15:49:15Zhttps://debian-facile.org/viewtopic.php?pid=145317#p145317
cat fichierCR.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<meta http-equiv="Content-Language" content="fr-ca">
cat fichierLF.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="fr-ca">
<meta name="ProgId" content="FrontPage.Editor.Document">
]]>
https://debian-facile.org/profile.php?id=38462015-11-06T15:41:23Zhttps://debian-facile.org/viewtopic.php?pid=145316#p145316https://debian-facile.org/profile.php?id=44552015-11-06T15:34:55Zhttps://debian-facile.org/viewtopic.php?pid=145315#p145315Un fichier avec fin de lignes en Mac :
Un fichier avec fin de lignes en Unix:
Je veux transformer les CR en LF. Comme j'ai à peu près 10000 fichiers, il me faudrait automatiser tout ça plutôt que de les faire un par un dans Geany avec Documents -> Définir les fins de lignes. Mais avant d'automatiser, une ligne de commande sans changer le nom du fichier (comme avec tr), ce serait pas mal. Donc je pensais à Sed ]]>https://debian-facile.org/profile.php?id=38462015-11-06T15:28:00Zhttps://debian-facile.org/viewtopic.php?pid=145314#p145314https://debian-facile.org/profile.php?id=7162015-11-06T15:18:09Zhttps://debian-facile.org/viewtopic.php?pid=145313#p145313 J'ai plein de fichiers html qui viennent d'un Mac ! (Horreur et stupéfaction)
Donc les fin de lignes sont en CR. Évidemment, je voudrais du LF. J'ai beau avoir chercher, je ne m'y connais pas assez en Sed pour fabriquer ma ligne de commande moi-même à partir de ce que je trouve. Donc je viens demander de l'aide. ]]>https://debian-facile.org/profile.php?id=38462015-11-06T15:15:41Zhttps://debian-facile.org/viewtopic.php?pid=145312#p145312