Вы находитесь на странице: 1из 2

Exercices : manipulations de texte

Alexandra Volanschi avolansk@eila.univ-paris-diderot.fr Pascal Cabaud pc@eila.univ-paris-diderot.fr Dplacez-vous dans le rpertoire Exos sous GNU/Linux. Tlchargez ici l'archive Fichiers ncessaires pour les sances du 9 et 16 fvrier puis e!traire les "chiers de l'archive.

# $ %rer une liste de diffusion


$ %onvertir le "chier Talc_Participation_Anonymisee.xls au for&at .csv 'en utilisant le caract(re ta)ulation co&&e sparateur de cha&ps*. Deu! fa+ons de procder pourront ,tre tests 1. .uvrir le "chier avec OpenOffce puis / partir du &enu Fichier sauvegarder le "chier sous for&at .csv 'Comma-separe ed !alues*. 2. 0tiliser la co&&ande csv2xls. $ xls2csv Talc_Paricipation_Annonimise.xls > tpa.csv $ 1 partir du "chier tpa.csv e!traire la colonne correspondant au! adresses des participants / ce congr(s. $ cut -d ! -f" tpa.csv

$ 2odi"er la co&&ande prcdente de &ani(re / transfor&er les lignes co&portant deu! adresses par ligne 'spares par des point-virgules*. %o&&e rsultat de cette co&&ande on devrait o)tenir une seule adresse lectroni3ue par ligne. $ cut -d! -f" tpa.csv #tr $%$ $&n$ #tr -d &$ $ 2odi"er la co&&ande prcdente de &ani(re / effacer les espaces. $ cut -d! -f" tpa.csv #tr $%$ $&n$ #tr -d &$ #tr -d $ 2odi"er la co&&ande prcdente de &ani(re / &ettre toutes les adresses &ails sur une &,&e ligne spares par un %. $ cut -d! -f" tpa.csv #tr $%$ $&n$ #& ' tr -d # tr $&n$ % $ 4n"n rediriger la liste_diffus.txt. sortie de la co&&ande prcdente vers un "chier appel

$ cut -d! -f" tpa.csv #tr $%$ $&n$ #& ' tr -d # tr $&n$ % > liste_diffus.txt

5 $ %alculer la liste des 67 &ots les plus fr3uents


Dans le mini-corpus constitu des "chiers 8 st2(("()_s_22*_en_fr_ta+.txt

8 st2(("()_s_2,-_en_fr_ta+.txt 8 st2(("()_s_2,._en_fr_ta+.txt, 8 st2(("()_s_2/0_en_fr_ta+.txt.

en utilisant le caract(re "oc#er 1 af"cher successive&ent le contenu des 9 "chiers -

$ cat st1.txt

la for&e gnrale de ces "chiers est - mo ta)ulation a#a &t*.

$ i%ue e

lemma 'le sparateur est une

e!traire la colonne correspondant au! &ots puis en utilisant les co&&andes sort2-3 'alpha)ti3ue et nu&ri3ue* et uni42-3 'avec l'option -c* calculer la liste de fr3uence des &ots de ce "chier.

$ cat st1.txt # cut -f- # sort # uni4 -c

2odi"er la co&&ande prcdente de &ani(re / n'af"cher 3ue les 67 &ots les plus fr3uents.

$ cat st1.txt # cut -f- # sort -f # uni4 -c # sort -+r # 5ead -2( No e - la version GNU de sort2-3 ncessite d'utiliser l'option -+ 3ui n'est pas &entionne dans la nor&e :.;<= > cette version est la plus courante sur les s?st(&es GNU/Linux. #vec une version :.;<= de sort2-3 'sur les s?st(&es Unix traditionnels &'s em V ou (&)* utiliser l'option -n et non -+.

2odi"er la co&&ande prcdente de &ani(re / af"cher les @7 le&&es les plus fr3uentes.

$ cat st1.txt # cut -f) # sort -f #& ' uni4 -c # sort -+r -k - # 5ead -)( No e - &,&e re&ar3ue sur la version de la co&&ande sort2-3.

2odi"er la &,&e co&&ande de &ani(re / af"cher les A ti3uettes les plus fr3uentes.

$ cat st1.txt # cut -f2 #sort -f #& ' uni4 -c # sort -+r -k - # 5ead -" No e - &,&e re&ar3ue sur la version de la co&&ande sort2-3.

% $ Fr3uencer des )igra&&es


4n utilisant les co&&andes cat2-3 sort2-3 uni42-3 cut2-3 paste2-3 tr2-3 tail2-3 5ead2-3 et uni3ue&ent ces co&&andes crer la liste des A7 suites de 6 &ots les plus fr3uents dans votre corpus. *ndica ion - penser / utiliser l'option --lines67n avec la co&&ande tail2-3B $ cat 1.txt # tr -cs $89alp5a9:$ $&n$ #& ' tee ;tmp;mots- # tail --lines672 > ;tmp;mots2 $ paste ;tmp;mots- ;tmp;mots2 #sort #uni4 -c #sort -+r #5ead -"( No e - cette option --lines67n de tail2-3 n'est pas non plus standardise par les nor&es :.;<=. ;ur un s?st(&e Unix traditionnel l'option -n 72 suf"t. +ac O& , 3uoi3ue faisant partie de la fa&ille des s?st(&es (&) utilise une vieille version de GNU de tail2-3.

Вам также может понравиться

  • Maitrisons VI / VIM sous Linux
    Maitrisons VI / VIM sous Linux
    От Everand
    Maitrisons VI / VIM sous Linux
    Оценок пока нет
  • Partiel2019 Corr
    Partiel2019 Corr
    Документ11 страниц
    Partiel2019 Corr
    ben Mhamed Issam
    Оценок пока нет
  • Maitrisez La Configuration Apache Tomcat Sous Linux
    Maitrisez La Configuration Apache Tomcat Sous Linux
    От Everand
    Maitrisez La Configuration Apache Tomcat Sous Linux
    Оценок пока нет
  • Script
    Script
    Документ5 страниц
    Script
    Omar Oughzal
    Оценок пока нет
  • QCM Linux
    QCM Linux
    Документ2 страницы
    QCM Linux
    Vito Coppola
    Оценок пока нет
  • Commandes Linux
    Commandes Linux
    Документ11 страниц
    Commandes Linux
    Michael Sniper Wu
    Оценок пока нет
  • Corrige S
    Corrige S
    Документ28 страниц
    Corrige S
    Castro Fidèle
    Оценок пока нет
  • Aide Mémoire de Certaines Commandes Linux PDF
    Aide Mémoire de Certaines Commandes Linux PDF
    Документ10 страниц
    Aide Mémoire de Certaines Commandes Linux PDF
    Mohammed Zaryouch
    Оценок пока нет
  • Linux Cours3
    Linux Cours3
    Документ39 страниц
    Linux Cours3
    Ens HAMANI Nacer
    Оценок пока нет
  • 02 - Commandes Linux
    02 - Commandes Linux
    Документ6 страниц
    02 - Commandes Linux
    Oumaima Ziat
    Оценок пока нет
  • Chapitre 2 - Commandes de Gestion Des Fichiers
    Chapitre 2 - Commandes de Gestion Des Fichiers
    Документ19 страниц
    Chapitre 2 - Commandes de Gestion Des Fichiers
    Arij Korkad
    Оценок пока нет
  • Cours ns3
    Cours ns3
    Документ16 страниц
    Cours ns3
    Naàmi Sami
    Оценок пока нет
  • TP2: Gestion Des Fichiers Et Des Utilisateurs Exercice1
    TP2: Gestion Des Fichiers Et Des Utilisateurs Exercice1
    Документ2 страницы
    TP2: Gestion Des Fichiers Et Des Utilisateurs Exercice1
    Khadiija
    Оценок пока нет
  • Corrige TP03
    Corrige TP03
    Документ3 страницы
    Corrige TP03
    Zidan Didi
    Оценок пока нет
  • Cours OS
    Cours OS
    Документ100 страниц
    Cours OS
    omarkhan33
    Оценок пока нет
  • Examen 5
    Examen 5
    Документ32 страницы
    Examen 5
    Oumey Tv
    Оценок пока нет
  • TP Se2 Inf3 2023-1
    TP Se2 Inf3 2023-1
    Документ11 страниц
    TP Se2 Inf3 2023-1
    dey.ferrier.ram
    Оценок пока нет
  • Quelques Commandes Linux
    Quelques Commandes Linux
    Документ31 страница
    Quelques Commandes Linux
    Ismaïla Sow
    100% (1)
  • Exercice1 Unixx
    Exercice1 Unixx
    Документ6 страниц
    Exercice1 Unixx
    Institut Hfid
    Оценок пока нет
  • TP Per Missions D Acces Aux Fichiers
    TP Per Missions D Acces Aux Fichiers
    Документ2 страницы
    TP Per Missions D Acces Aux Fichiers
    radouane
    Оценок пока нет
  • Memento Unix Linux
    Memento Unix Linux
    Документ1 страница
    Memento Unix Linux
    adfzed
    Оценок пока нет
  • Memo Bash
    Memo Bash
    Документ9 страниц
    Memo Bash
    saad
    Оценок пока нет
  • Commandes de Base Linux - Odt
    Commandes de Base Linux - Odt
    Документ7 страниц
    Commandes de Base Linux - Odt
    b-elhadjhotmail.fr
    Оценок пока нет
  • Linux Commands Cheatsheet FR
    Linux Commands Cheatsheet FR
    Документ6 страниц
    Linux Commands Cheatsheet FR
    Zied Ben Rahma
    Оценок пока нет
  • Serveur DNS Sous GNULinux PDF
    Serveur DNS Sous GNULinux PDF
    Документ25 страниц
    Serveur DNS Sous GNULinux PDF
    sfihi malha
    Оценок пока нет
  • TP1
    TP1
    Документ6 страниц
    TP1
    Soufiane Ghyati
    Оценок пока нет
  • TP 1 Solution
    TP 1 Solution
    Документ3 страницы
    TP 1 Solution
    Omar Oughzal
    Оценок пока нет
  • Activités-Pratiques Avec Reponse
    Activités-Pratiques Avec Reponse
    Документ39 страниц
    Activités-Pratiques Avec Reponse
    yah.chno
    Оценок пока нет
  • Chapitre 4 Notion D'utilisateurs Dans Le Système UNIX
    Chapitre 4 Notion D'utilisateurs Dans Le Système UNIX
    Документ8 страниц
    Chapitre 4 Notion D'utilisateurs Dans Le Système UNIX
    pipila
    Оценок пока нет
  • Contrôle Continu 1 Base de Données 2019 2020
    Contrôle Continu 1 Base de Données 2019 2020
    Документ1 страница
    Contrôle Continu 1 Base de Données 2019 2020
    Saad Alilou
    Оценок пока нет
  • Les Commandes Fondamentales de Linux
    Les Commandes Fondamentales de Linux
    Документ27 страниц
    Les Commandes Fondamentales de Linux
    Brunel MALONGA
    Оценок пока нет
  • Stion Des Paquets
    Stion Des Paquets
    Документ4 страницы
    Stion Des Paquets
    Ds. Яөаm A1
    Оценок пока нет
  • TP2 PDF
    TP2 PDF
    Документ1 страница
    TP2 PDF
    Narjis Krt
    Оценок пока нет
  • Exercice (Linux) - Pour Revision
    Exercice (Linux) - Pour Revision
    Документ6 страниц
    Exercice (Linux) - Pour Revision
    Douae Ismaili
    Оценок пока нет
  • TP2 - Commandes de Base - Linux
    TP2 - Commandes de Base - Linux
    Документ4 страницы
    TP2 - Commandes de Base - Linux
    Wafae Boudrar
    Оценок пока нет
  • Commande Linux
    Commande Linux
    Документ6 страниц
    Commande Linux
    zakariaffm
    Оценок пока нет
  • Exercice 1: Soit La Base de Données Suivante
    Exercice 1: Soit La Base de Données Suivante
    Документ2 страницы
    Exercice 1: Soit La Base de Données Suivante
    Azzi Toufik
    Оценок пока нет
  • TP Linux
    TP Linux
    Документ6 страниц
    TP Linux
    SH Jul
    Оценок пока нет
  • Les Scripts
    Les Scripts
    Документ10 страниц
    Les Scripts
    Abdelghani Akil
    100% (2)
  • Grep
    Grep
    Документ8 страниц
    Grep
    YounessAR
    Оценок пока нет
  • M1105 tp6 Corr
    M1105 tp6 Corr
    Документ5 страниц
    M1105 tp6 Corr
    lasollo
    Оценок пока нет
  • Emd2 Linux Corrigé 2009-2010
    Emd2 Linux Corrigé 2009-2010
    Документ4 страницы
    Emd2 Linux Corrigé 2009-2010
    light dark
    Оценок пока нет
  • TP Resume Export Import
    TP Resume Export Import
    Документ3 страницы
    TP Resume Export Import
    tv myasian
    Оценок пока нет
  • Mi06 l2 Se1 Emd2012
    Mi06 l2 Se1 Emd2012
    Документ6 страниц
    Mi06 l2 Se1 Emd2012
    mina
    Оценок пока нет
  • U02 Gestion Disques Corrige 2012
    U02 Gestion Disques Corrige 2012
    Документ5 страниц
    U02 Gestion Disques Corrige 2012
    Bas Ma Oueslati
    Оценок пока нет
  • TD at Cron
    TD at Cron
    Документ1 страница
    TD at Cron
    bader haouari
    Оценок пока нет
  • TP1 Gestion Des Fichier-LSI
    TP1 Gestion Des Fichier-LSI
    Документ4 страницы
    TP1 Gestion Des Fichier-LSI
    Emna Chouikhi
    Оценок пока нет
  • Grep Awk Sed
    Grep Awk Sed
    Документ20 страниц
    Grep Awk Sed
    Nandrianina Randrianarison
    Оценок пока нет
  • Cours SE Complet PDF
    Cours SE Complet PDF
    Документ90 страниц
    Cours SE Complet PDF
    alonsop
    100% (1)
  • QCM Linux PARTIE 3
    QCM Linux PARTIE 3
    Документ3 страницы
    QCM Linux PARTIE 3
    Awono
    Оценок пока нет
  • Manueldestp Ateliersystmes2 180122164517
    Manueldestp Ateliersystmes2 180122164517
    Документ66 страниц
    Manueldestp Ateliersystmes2 180122164517
    abasse
    Оценок пока нет
  • TP02-Programmation Des Processus
    TP02-Programmation Des Processus
    Документ4 страницы
    TP02-Programmation Des Processus
    hayfa rajhi
    Оценок пока нет
  • SE Serie 1 Correction
    SE Serie 1 Correction
    Документ4 страницы
    SE Serie 1 Correction
    OUMAIMA BAHAFID
    Оценок пока нет
  • Vue D Ensemble de Windows PowerShell
    Vue D Ensemble de Windows PowerShell
    Документ7 страниц
    Vue D Ensemble de Windows PowerShell
    Mohamed Ayadi
    Оценок пока нет
  • QCM Linux PARTIE 1
    QCM Linux PARTIE 1
    Документ3 страницы
    QCM Linux PARTIE 1
    Awono
    Оценок пока нет
  • QCM PDF
    QCM PDF
    Документ7 страниц
    QCM PDF
    Rim Riima
    Оценок пока нет
  • Resume Linux
    Resume Linux
    Документ9 страниц
    Resume Linux
    bouananirania2004
    Оценок пока нет
  • Admi Linux Corriges
    Admi Linux Corriges
    Документ10 страниц
    Admi Linux Corriges
    Amadou Diallo
    Оценок пока нет
  • TP Linux
    TP Linux
    Документ4 страницы
    TP Linux
    Mohamed Chairi Hachmi
    Оценок пока нет
  • TP Linux
    TP Linux
    Документ4 страницы
    TP Linux
    anotherser01
    Оценок пока нет
  • Cours Algebre
    Cours Algebre
    Документ58 страниц
    Cours Algebre
    KM AH
    Оценок пока нет
  • TP Routage RIPv1
    TP Routage RIPv1
    Документ5 страниц
    TP Routage RIPv1
    Hassan Faouzi
    100% (1)
  • Câble Réseau Ethernet RJ45
    Câble Réseau Ethernet RJ45
    Документ4 страницы
    Câble Réseau Ethernet RJ45
    Hassan Faouzi
    100% (1)
  • Labo 1.5.1
    Labo 1.5.1
    Документ30 страниц
    Labo 1.5.1
    هشام بيك
    Оценок пока нет
  • TP Frame Relay Cor Rig É 351
    TP Frame Relay Cor Rig É 351
    Документ25 страниц
    TP Frame Relay Cor Rig É 351
    Hassan Faouzi
    Оценок пока нет
  • QCM Linux101training
    QCM Linux101training
    Документ9 страниц
    QCM Linux101training
    Hassan Faouzi
    0% (1)
  • Lab EIGRP
    Lab EIGRP
    Документ15 страниц
    Lab EIGRP
    Hassan Faouzi
    Оценок пока нет
  • Configuration Du Routage Entre Réseaux Locaux Virtuels
    Configuration Du Routage Entre Réseaux Locaux Virtuels
    Документ4 страницы
    Configuration Du Routage Entre Réseaux Locaux Virtuels
    Hassan Faouzi
    Оценок пока нет
  • Les Boucles
    Les Boucles
    Документ5 страниц
    Les Boucles
    Hassan Faouzi
    Оценок пока нет
  • Script PHP Mysql
    Script PHP Mysql
    Документ8 страниц
    Script PHP Mysql
    Hassan Faouzi
    Оценок пока нет
  • Les Contraintes en SQL Dveloppem
    Les Contraintes en SQL Dveloppem
    Документ14 страниц
    Les Contraintes en SQL Dveloppem
    Riadh Matmat
    Оценок пока нет
  • MS Dos PDF
    MS Dos PDF
    Документ19 страниц
    MS Dos PDF
    Adil Abouelhassan
    Оценок пока нет
  • Présentation Projet Devops
    Présentation Projet Devops
    Документ18 страниц
    Présentation Projet Devops
    abba bamba kara
    Оценок пока нет
  • Capture D'écran . 2021-10-09 À 17.30.47
    Capture D'écran . 2021-10-09 À 17.30.47
    Документ37 страниц
    Capture D'écran . 2021-10-09 À 17.30.47
    Vladimir lo loveur El lova
    Оценок пока нет
  • 5 qosRouteurCISCO
    5 qosRouteurCISCO
    Документ5 страниц
    5 qosRouteurCISCO
    yves
    Оценок пока нет
  • Plan de Cours - RES240 - Collecte Et Analyse Des Logs Avec Splunk
    Plan de Cours - RES240 - Collecte Et Analyse Des Logs Avec Splunk
    Документ3 страницы
    Plan de Cours - RES240 - Collecte Et Analyse Des Logs Avec Splunk
    junior Demefack
    Оценок пока нет
  • HP500
    HP500
    Документ4 страницы
    HP500
    Ali Boudjerada
    Оценок пока нет
  • Poo TD1 2015
    Poo TD1 2015
    Документ3 страницы
    Poo TD1 2015
    Riadh Matmat
    Оценок пока нет
  • Manuel D'utilisation de La Caméra de Chasse MAHEVY H5 - Manuals+
    Manuel D'utilisation de La Caméra de Chasse MAHEVY H5 - Manuals+
    Документ38 страниц
    Manuel D'utilisation de La Caméra de Chasse MAHEVY H5 - Manuals+
    Emmanuel Anzeraey
    Оценок пока нет
  • Rapport de NAGIOS
    Rapport de NAGIOS
    Документ33 страницы
    Rapport de NAGIOS
    αψόΰβάιτείηάδφ
    100% (3)
  • Initiation Outils Frameworks
    Initiation Outils Frameworks
    Документ5 страниц
    Initiation Outils Frameworks
    Szn Ess
    Оценок пока нет
  • Cunit
    Cunit
    Документ7 страниц
    Cunit
    Amine Mokni
    Оценок пока нет
  • Siemens PPI
    Siemens PPI
    Документ41 страница
    Siemens PPI
    Beth Valerdi
    Оценок пока нет
  • vIOS-L2 Image For GNS3 - SYSNETTECH Solutions
    vIOS-L2 Image For GNS3 - SYSNETTECH Solutions
    Документ8 страниц
    vIOS-L2 Image For GNS3 - SYSNETTECH Solutions
    Ict lab
    Оценок пока нет
  • Sujet 13
    Sujet 13
    Документ3 страницы
    Sujet 13
    Lilly Hope Mili
    Оценок пока нет
  • 02 MSP430 PDF
    02 MSP430 PDF
    Документ54 страницы
    02 MSP430 PDF
    Sonia Assemian
    Оценок пока нет
  • TP 2018 Ordi
    TP 2018 Ordi
    Документ2 страницы
    TP 2018 Ordi
    alex bbap
    Оценок пока нет
  • Cours - Dba P3
    Cours - Dba P3
    Документ27 страниц
    Cours - Dba P3
    Mohamed Saadaoui
    Оценок пока нет
  • Préparation À La Certification LPIC1-EXAM 101: Consignes
    Préparation À La Certification LPIC1-EXAM 101: Consignes
    Документ2 страницы
    Préparation À La Certification LPIC1-EXAM 101: Consignes
    bader haouari
    Оценок пока нет
  • Sujet-Corrige EF ECS1
    Sujet-Corrige EF ECS1
    Документ5 страниц
    Sujet-Corrige EF ECS1
    Oumaima EZZITOUNE
    Оценок пока нет
  • Semaphores
    Semaphores
    Документ17 страниц
    Semaphores
    ilyes
    Оценок пока нет
  • Veeam Backup 8 Free Edition Datasheet FR
    Veeam Backup 8 Free Edition Datasheet FR
    Документ2 страницы
    Veeam Backup 8 Free Edition Datasheet FR
    Trong Oganort Gampoula
    Оценок пока нет
  • Serveur FTP VSFTPD PDF
    Serveur FTP VSFTPD PDF
    Документ11 страниц
    Serveur FTP VSFTPD PDF
    Grexy Le Grand
    100% (1)
  • Tems Investigation
    Tems Investigation
    Документ136 страниц
    Tems Investigation
    Muhammad Kazmouz
    100% (1)
  • DS2 - Accès Aux Réseaux Etendus
    DS2 - Accès Aux Réseaux Etendus
    Документ12 страниц
    DS2 - Accès Aux Réseaux Etendus
    Anass BouHzam
    Оценок пока нет
  • Controlcontinue 2021
    Controlcontinue 2021
    Документ2 страницы
    Controlcontinue 2021
    Abdellah Lazreg
    Оценок пока нет
  • Fiche TD Info 1erecetd
    Fiche TD Info 1erecetd
    Документ4 страницы
    Fiche TD Info 1erecetd
    Yann Abiam
    Оценок пока нет
  • Tables de Routage
    Tables de Routage
    Документ13 страниц
    Tables de Routage
    hamza jmili
    Оценок пока нет
  • Memoire Partagée
    Memoire Partagée
    Документ4 страницы
    Memoire Partagée
    kikoouaras
    Оценок пока нет
  • Rapport Android Jee
    Rapport Android Jee
    Документ21 страница
    Rapport Android Jee
    Khalid Felouach
    Оценок пока нет
  • От Everand
    Оценок пока нет
  • От Everand
    Оценок пока нет