• # ça marche chez moi

    Posté par (site web personnel, Mastodon) . En réponse au message Extraire des données d'une page youtube. Évalué à 2.

    Ta demande n'est pas très claire, en tout cas je ne vois personnellement pas le problème

    $ cat fichier
    txt please share it and SUBSCRIBE! Watch also our other videos!\n\nHOST : free.cccam.net\nPORT : 21776\nUSER : cccamtv.net\nPASS : 1758624\nPlease like the video for Support Thank You Great People\n---------------------------------\nhttps://cccam.net\n-------
    $ sed 's#\nPORT : # #g' fichier 
    txt please share it and SUBSCRIBE! Watch also our other videos!\n\nHOST : free.cccam.net\nPORT : 21776\nUSER : cccamtv.net\nPASS : 1758624\nPlease like the video for Support Thank You Great People\n---------------------------------\nhttps://cccam.net\n-------
    $ # normal, il n'y a pas de saut de ligne...
    $ sed 's#\\nPORT : # #g' fichier 
    txt please share it and SUBSCRIBE! Watch also our other videos!\n\nHOST : free.cccam.net 21776\nUSER : cccamtv.net\nPASS : 1758624\nPlease like the video for Support Thank You Great People\n---------------------------------\nhttps://cccam.net\n-------
    $ # et sinon...
    $ grep -Eo ' (free\.cccam\.net|cccamtv\.net|[0-9]+)' fichier | tr -d '\n'
     free.cccam.net 21776 cccamtv.net 1758624
    

    "It is seldom that liberty of any kind is lost all at once." ― David Hume