Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 72
» Latest member: stewartshic
» Forum threads: 342
» Forum posts: 369

Full Statistics

Online Users
There are currently 12 online users.
» 0 Member(s) | 12 Guest(s)

Latest Threads
Test, just a XRumer 23 St...
Forum: Announcements
Last Post: XRumer23lip
09-25-2025, 01:01 AM
» Replies: 0
» Views: 30
Comment créer un sous-dom...
Forum: Cpanel
Last Post: XRumer23lip
10-28-2024, 04:29 AM
» Replies: 1
» Views: 1,188
Tutorial: Create an Onlin...
Forum: Ellohost
Last Post: mikox
08-03-2024, 07:46 AM
» Replies: 0
» Views: 288
Tutoriel : Créer un Site ...
Forum: Ellohost
Last Post: mikox
08-03-2024, 07:45 AM
» Replies: 0
» Views: 314
Tutorial: Create a Profes...
Forum: Ellohost
Last Post: mikox
08-03-2024, 07:13 AM
» Replies: 0
» Views: 220
Tutoriel : Créer un Site ...
Forum: Ellohost
Last Post: mikox
08-03-2024, 07:12 AM
» Replies: 0
» Views: 252
Slither.io - Become the L...
Forum: Others
Last Post: mikox
04-05-2024, 07:30 AM
» Replies: 0
» Views: 310
MooMoo.io - Build, Defend...
Forum: Others
Last Post: mikox
04-05-2024, 07:28 AM
» Replies: 0
» Views: 331
Smash Karts - The Ultimat...
Forum: Others
Last Post: mikox
04-05-2024, 07:26 AM
» Replies: 0
» Views: 712
Dream Chef - A Cooking Ad...
Forum: Others
Last Post: mikox
04-05-2024, 07:24 AM
» Replies: 0
» Views: 305

 
  Mettre entre parenthèses la première lettre de chaque mot avec la commande sed
Posted by: aaron - 09-08-2023, 11:51 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>Mettre entre parenthèses la première lettre de chaque mot avec la commande sed</title>
</head>
<body>
    <h1>Mettre entre parenthèses la première lettre de chaque mot avec la commande sed</h1>
    <p>Voici un exemple de commande <code>sed</code> pour mettre entre parenthèses la première lettre de chaque mot :</p>
    <pre><code>echo "phrase_souhaitée" | sed 's/\(\b[A-Z]\)/\(\1\)/g'</code></pre>
    <p>Par exemple, pour afficher la première lettre de "Une exemple de la commande sed" entre parenthèses, entrez :</p>
    <pre><code>echo "Une exemple de la commande sed" | sed 's/\(\b[A-Z]\)/\(\1\)/g'</code></pre>
    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: white; border: none;">Rejoindre ellohost</button></a>
</body>
</html>

Print this item

  Replace nth to All Occurrences with Sed
Posted by: aaron - 09-06-2023, 11:21 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Replace nth to All Occurrences with Sed</title>
</head>
<body>
    <h1>Replace nth to All Occurrences with Sed</h1>
    <p>Use <code>sed</code> to replace patterns from the nth to all occurrences in a line:</p>
    <pre><code>sed 's/old_string/new_string/#g' samplefile.txt</code></pre>
    <p>For example, to replace "pisces" with "aquarius" from the second occurrence to all occurrences:</p>
    <pre><code>sed 's/pisces/aquarius/2g' astrology.txt</code></pre>
    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: white; border: none;">Join ellohost</button></a>
</body>
</html>

Print this item

  Remplacer de la n-ième à toutes les occurrences avec Sed
Posted by: aaron - 09-06-2023, 11:18 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>Remplacer de la n-ième à toutes les occurrences avec Sed</title>
</head>
<body>
    <h1>Remplacer de la n-ième à toutes les occurrences avec Sed</h1>
    <p>Utilisez la commande <code>sed</code> pour remplacer les motifs de la n-ième à toutes les occurrences dans une ligne :</p>
    <pre><code>sed 's/ancien_motif/nouveau_motif/#g' fichier_exemple.txt</code></pre>
    <p>Par exemple, pour remplacer "poissons" par "verseau" de la deuxième occurrence à toutes les occurrences :</p>
    <pre><code>sed 's/poissons/verseau/2g' astrologie.txt</code></pre>
    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: white; border: none;">Rejoindre ellohost</button></a>
</body>
</html>

Print this item

  Remplacer toutes les occurrences avec Sed
Posted by: aaron - 09-06-2023, 11:17 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>Comment remplacer toutes les occurrences d'un motif dans une ligne en utilisant la commande sed</title>
</head>
<body>
    <h1>Comment remplacer toutes les occurrences d'un motif dans une ligne en utilisant la commande sed</h1>
    <p>Par défaut, sed ne remplace que la première occurrence d'une chaîne spécifiée dans chaque ligne. Il recherche la première instance, la remplace, puis passe à la ligne d'entrée suivante.</p>
    <p>Pour remplacer toutes les occurrences d'un motif dans une seule ligne, ajoutez un indicateur de substitution <code>/g</code> pour un remplacement global. Voici le script sed :</p>
    <pre><code>sed ‘s/old_string/new_string/g’ samplefile.txt
    </code></pre>
    <p>Par exemple, pour remplacer toutes les occurrences qui contiennent "eagle" par "faucon" dans une ligne du fichier <code>animals.txt</code>, exécutez :</p>
    <pre><code>sed ‘s/eagle/faucon/g’ animals.txt
    </code></pre>
    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: white; border: none;">Rejoignez ellohost</button></a>
</body>
</html>

Print this item

  How to Replace All the Occurrences of the Pattern in a Line Using the sed Command
Posted by: aaron - 09-06-2023, 11:13 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="en">
<head>
    <title>How to Replace All the Occurrences of the Pattern in a Line Using the sed Command</title>
</head>
<body>
    <h1>How to Replace All the Occurrences of the Pattern in a Line Using the sed Command</h1>
    <p>By default, sed only substitutes the first occurrence of a specified string in every line. It looks for the initial instance, replaces it, and moves on to the following input line.</p>
    <p>To replace all the pattern occurrences in one line, add a substitute flag <code>/g</code> for global replacement. Here’s the sed script:</p>
    <pre><code>sed ‘s/old_string/new_string/g’ samplefile.txt
    </code></pre>
    <p>For example, to replace all occurrences that contain “eagle” with “falcon” in a line inside <code>animals.txt</code>, run:</p>
    <pre><code>sed ‘s/eagle/falcon/g’ animals.txt
    </code></pre>
    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a>
</body>
</html>

Print this item

  How to Replace the nth Occurrence of a Pattern in a Line Using a sed Command
Posted by: aaron - 09-06-2023, 11:12 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="en">
<head>
    <title> How to Replace the nth Occurrence of a Pattern in a Line Using a sed Command </title>
</head>
<body>
    <h1>How to Replace the nth Occurrence of a Pattern in a Line Using a sed Command</h1>
   
    <p>Insert the corresponding character, either a slash ( / ) or a vertical bar ( | ), and substitute the hash ( # ) symbol with the desired number to replace the nth occurrence of a pattern in a line. Here's the basic syntax:</p>

    <pre><code>sed ‘s/old_string/new_string/#’ samplefile.txt</code></pre>

    <p>For example, to replace the first occurrence of the word "<code>music</code>" with "<code>song</code>" in a line inside the <code>playlist.txt</code> file, enter:</p>

    <pre><code>sed ‘s/music/song/1’ playlist.txt</code></pre>

    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a>
</body>
</html>

Print this item

  Comment remplacer la nième occurrence d'un motif avec sed
Posted by: aaron - 09-06-2023, 11:11 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>Comment remplacer la nième occurrence d'un motif dans une ligne en utilisant une commande sed</title>
</head>
<body>
    <h1>Comment remplacer la nième occurrence d'un motif dans une ligne en utilisant une commande sed</h1>
   
    <p>Insérez un caractère correspondant, soit une barre oblique ( / ) ou une barre verticale ( | ), et remplacez le symbole dièse ( # ) par le numéro souhaité pour remplacer la nième occurrence d'un motif dans une ligne. Voici la syntaxe de base :</p>

    <pre><code>sed ‘s/ancienne_chaîne/nouvelle_chaîne/#’ fichierexemple.txt</code></pre>

    <p>Par exemple, pour remplacer la première occurrence du mot "<code>musique</code>" par "<code>chanson</code>" dans une ligne à l'intérieur du fichier <code>playlist.txt</code>, entrez :</p>

    <pre><code>sed ‘s/musique/chanson/1’ playlist.txt</code></pre>

    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoignez ellohost</button></a>
</body>
</html>

Print this item

  Comment remplacer une chaîne de caractères avec la commande sed
Posted by: aaron - 09-06-2023, 11:09 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>Comment remplacer une chaîne de caractères avec la commande sed</title>
</head>
<body>
    <h1>Comment remplacer une chaîne de caractères avec la commande sed</h1>
   
    <p>La commande sed est couramment utilisée pour remplacer du texte. Elle recherchera un motif spécifié dans un fichier et le remplacera par la chaîne de caractères souhaitée.</p>

    <p>Pour ce faire, utilisez la commande de substitution <code>s</code> et des délimiteurs pour séparer chaque champ. Remplacez la valeur "<code>ancienne_chaîne</code>" par le nom d'origine et "<code>nouvelle_chaîne</code>" par le texte souhaité :</p>

    <pre><code>sed ‘s/ancienne_chaîne/nouvelle_chaîne/’ fichierexemple.txt</code></pre>

    <p>Par exemple, pour substituer le mot "<code>images</code>" par "<code>photos</code>" dans le fichier <code>scenery.txt</code>, entrez la commande suivante :</p>

    <pre><code>sed ‘s/images/photos/’ scenery.txt</code></pre>

    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoignez ellohost</button></a>
</body>
</html>

Print this item

  How to Replace a String Using the sed Command
Posted by: aaron - 09-06-2023, 11:08 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="en">
<head>
    <title>How to Replace a String Using the sed Command</title>
</head>
<body>
    <h1>How to Replace a String Using the sed Command</h1>
   
    <p>The sed command is commonly used for replacing text. It will search for a specified pattern in a file and change it with the desired string.</p>

    <p>To do it, use the substitution command <code>s</code> and delimiters to separate each field. Replace the “<code>old_string</code>” value with the original name and “<code>new_string</code>” with the preferred text:</p>

    <pre><code>sed ‘s/old_string/new_string/’ samplefile.txt</code></pre>

    <p>For example, to substitute the word “<code>images</code>” with “<code>photos</code>” in the <code>scenery.txt</code> file, enter the following:</p>

    <pre><code>sed ‘s/images/photos/’ scenery.txt</code></pre>

    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a>
</body>
</html>

Print this item

  Comment Installer la Commande sed sous Linux
Posted by: aaron - 09-06-2023, 11:07 AM - Forum: Others - No Replies

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>Comment Installer la Commande sed sous Linux</title>
</head>
<body>
    <h1>Comment Installer la Commande sed sous Linux</h1>
   
    <p>Le package sed est généralement inclus par défaut avec la plupart des distributions Linux. Cependant, si vous ne l'avez pas installé par défaut, suivez ces étapes :</p>

    <ol>
        <li>Accédez à SSH via votre VPS et connectez-vous en utilisant le compte sudo.</li>
        <li>Mettez à jour le système actuel en saisissant cette commande :</li>
    </ol>

    <pre><code>sudo apt-get update</code></pre>

    <ol start="3">
        <li>Installez le package sed en entrant la commande suivante :</li>
    </ol>

    <pre><code>sudo apt-get install sed</code></pre>

    <ol start="4">
        <li>Vérifiez la version en exécutant la commande ci-dessous :</li>
    </ol>

    <pre><code>sed --version</code></pre>

    <br><br>
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoignez ellohost</button></a>
</body>
</html>

Print this item