Outils pour utilisateurs

Outils du site


liste_man.sh

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
liste_man.sh [2015/12/21 23:50] simonliste_man.sh [2026/08/22 22:12] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1
Ligne 1: Ligne 1:
-====== Script "liste_man.sh" ====== 
-Ce script a pour objet de générer un fichier ''.txt'' contenant le [[man]] des [[commandes]] qui sont dans ce wiki. 
- 
-==== Avec deux commandes ==== 
-Voici un exemple avec seulement deux commandes : 
-<code bash> 
-#!/bin/bash 
- 
-# Déclaration d'un tableau contenant la liste des commandes dont on veut générer le man 
-tab=("cat" "cd") 
- 
-# Afficher tous les éléments du tableau 
-echo ${tab[@]} 
- 
-# Pour chaque élément dans le tableau, générer le man et l'enregistrer dans man_NOM_COMMANDE.txt 
-for i in ${!tab[@]}; do man ${tab[i]} > man_${tab[i]}.txt; done 
- 
-exit 0 
-</code> 
- 
-On lance le script pour vérifier son bon fonctionnement : 
-<code> 
-$ ls 
-liste_man.sh 
-$ ./liste_man.sh  
-cat ls 
-$ ls 
-liste_man.sh  man_cat.txt  man_ls.txt 
-$ head man_* 
-==> man_cat.txt <== 
-CAT(1)     Commandes     CAT(1) 
- 
-NOM 
-       cat - Concaténer des fichiers et les afficher sur la sortie standard 
-SYNOPSIS 
-       cat [OPTION] ... [FICHIER] ... 
- 
-==> man_ls.txt <== 
-LS(1)     Commandes     LS(1) 
- 
-NOM 
-       ls - Afficher le contenu de répertoires 
-SYNOPSIS 
-       ls [OPTION] ... [FICHIER] ... 
-</code> 
-<WRAP center round tip 60%> 
-Pour pouvoir exécuter le script avec le raccourcis ''./'', il ne faut pas oublier de faire ''$ chmod +x liste_man.sh'' 
-</WRAP> 
- 
-==== Script avec toutes les commandes ==== 
-<code bash> 
-#!/bin/bash 
- 
-# Déclaration du tableau contenant la liste des commandes 
-tab=("alias" "apt" "aptitude" "awk" "bash" "cat" "cd" "chgrp" "chmod" "chown"  
-"cmake" "cp" "crontab" "curl" "cut" "date" "dd" "diff" "diff3" "dig" "dir" 
-"dirname" "dmesg" "dpkg" "egrep" "emacs" "file" "find" "free" "from" "fsck"  
-"git" "gksudo" "gpg" "gpg2" "grep" "gunzip" "gzip" "head" "hexdump" "history"  
-"host" "hostname" "htop" "htpasswd" "ifdown" "ifup" "ip" "iptables" "irssi"  
-"isodump" "journalctl" "jrnl" "kvmq" "latex" "less" "let" "line" "link" "locate" 
-"logname" "ls" "lscpu" "lshw" "lsof" "lspci" "lsusb" "lynx" "make" "man"  
-"minicom" "mlocate" "modprobe" "mogrify" "more" "most" "mount" "mutt" "nano"  
-"nc" "ncat" "netcat" "nl" "nmap" "nohup" "nslookup" "open" "openssl" "pager"  
-"pdfinfo" "pdflatex" "pftp" "photorec" "pico" "print" "proxy" "ps" "pulseaudio"  
-"pwd" "python" "qpdf" "quickbook" "ranger" "rename" "resize" "rm" "rmdir"  
-"route" "rsync" "rvim" "scp" "screendump" "script" "sdiff" "seahorse" "sed"  
-"see" "sftp" "size" "sleep" "snice" "sort" "split" "ssh" "sshfs" "startx" "su"  
-"sudo" "systemd" "tar" "tee" "telnet" "top" "touch" "tracepath" "tree" "umount"  
-"unalias" "unar" "uncompress" "uniq" "unrar" "until" "unzip" "uptime" "users"  
-"vi" "vim" "volname" "w" "wait" "wc" "weave" "wget" "whatis" "whereis" "which" 
-"while" "whiptail" "who" "whoami" "whois" "wish" "write" "xrandr" "yes"  
-"ypdomainname" "zcat" "zcmp" "zip") 
- 
-# Afficher tous les éléments de "tableau" 
-echo ${tab[@]} 
- 
-# Exporter le man de chaque commande 
-for i in ${!tab[@]}; do man ${tab[i]} > man_${tab[i]}.txt; done 
- 
-exit 0 
-</code> 
- 
-== Exécution == 
-<code> 
-$ ls 
-liste_man.sh 
- 
-$ ./liste_man.sh  
-alias apt aptitude awk bash cat cd chgrp chmod chown cmake cp crontab curl cut date dd diff diff3 dig dir dirname dmesg dpkg egrep emacs file find free from fsck git gksudo gpg gpg2 grep gunzip gzip head hexdump history host hostname htop htpasswd ifdown ifup ip iptables irssi isodump journalctl jrnl kvmq latex less let line link locate logname ls lscpu lshw lsof lspci lsusb lynx make man minicom mlocate modprobe mogrify more most mount mutt nano nc ncat netcat nl nmap nohup nslookup open openssl pager pdfinfo pdflatex pftp photorec pico print proxy ps pulseaudio pwd python qpdf quickbook ranger rename resize rm rmdir route rsync rvim scp screendump script sdiff seahorse sed see sftp size sleep snice sort split ssh sshfs startx su sudo systemd tar tee telnet top touch tracepath tree umount unalias unar uncompress uniq unrar until unzip uptime users vi vim volname w wait wc weave wget whatis whereis which while whiptail who whoami whois wish write xrandr yes ypdomainname zcat zcmp zip 
-Aucune entrée de manuel pour alias 
-Aucune entrée de manuel pour cd 
-Aucune entrée de manuel pour jrnl 
-voir « man 7 undocumented » pour obtenir de l'aide quand les pages de manuel ne sont pas disponibles. 
-Aucune entrée de manuel pour kvmq 
-Aucune entrée de manuel pour let 
-man: impossible d'ouvrir /usr/share/man/man3/caca_event_@0.3caca: Aucun fichier ou dossier de ce type 
-mdoc warning: Empty input line #226 
-mdoc warning: Empty input line #228 
-mdoc warning: Empty input line #251 
-mdoc warning: Empty input line #253 
-mdoc warning: Empty input line #255 
-mdoc warning: Empty input line #482 
-mdoc warning: Empty input line #484 
-mdoc warning: Empty input line #547 
-Aucune entrée de manuel pour unalias 
-Aucune entrée de manuel pour until 
-man: impossible d'ouvrir /usr/share/man/man3/caca_event_@0_@2.3caca: Aucun fichier ou dossier de ce type 
-Aucune entrée de manuel pour while 
- 
-$ ls 
-liste_man.sh      man_egrep.txt     man_irssi.txt       man_more.txt        man_python.txt      man_ssh.txt         man_wait.txt 
-man_alias.txt     man_emacs.txt     man_isodump.txt     man_most.txt        man_qpdf.txt        man_startx.txt      man_wc.txt 
-man_aptitude.txt  man_file.txt      man_journalctl.txt  man_mount.txt       man_quickbook.txt   man_sudo.txt        man_weave.txt 
-man_apt.txt       man_find.txt      man_jrnl.txt        man_mutt.txt        man_ranger.txt      man_su.txt          man_wget.txt 
-man_awk.txt       man_free.txt      man_kvmq.txt        man_nano.txt        man_rename.txt      man_systemd.txt     man_whatis.txt 
-man_bash.txt      man_from.txt      man_latex.txt       man_ncat.txt        man_resize.txt      man_tar.txt         man_whereis.txt 
-man_cat.txt       man_fsck.txt      man_less.txt        man_nc.txt          man_rmdir.txt       man_tee.txt         man_which.txt 
-man_cd.txt        man_git.txt       man_let.txt         man_netcat.txt      man_rm.txt          man_telnet.txt      man_while.txt 
-man_chgrp.txt     man_gksudo.txt    man_line.txt        man_nl.txt          man_route.txt       man_top.txt         man_whiptail.txt 
-man_chmod.txt     man_gpg2.txt      man_link.txt        man_nmap.txt        man_rsync.txt       man_touch.txt       man_whoami.txt 
-man_chown.txt     man_gpg.txt       man_locate.txt      man_nohup.txt       man_rvim.txt        man_tracepath.txt   man_whois.txt 
-man_cmake.txt     man_grep.txt      man_logname.txt     man_nslookup.txt    man_scp.txt         man_tree.txt        man_who.txt 
-man_cp.txt        man_gunzip.txt    man_lscpu.txt       man_openssl.txt     man_screendump.txt  man_umount.txt      man_wish.txt 
-man_crontab.txt   man_gzip.txt      man_lshw.txt        man_open.txt        man_script.txt      man_unalias.txt     man_write.txt 
-man_curl.txt      man_head.txt      man_lsof.txt        man_pager.txt       man_sdiff.txt       man_unar.txt        man_w.txt 
-man_cut.txt       man_hexdump.txt   man_lspci.txt       man_pdfinfo.txt     man_seahorse.txt    man_uncompress.txt  man_xrandr.txt 
-man_date.txt      man_history.txt   man_ls.txt          man_pdflatex.txt    man_sed.txt         man_uniq.txt        man_yes.txt 
-man_dd.txt        man_hostname.txt  man_lsusb.txt       man_pftp.txt        man_see.txt         man_unrar.txt       man_ypdomainname.txt 
-man_diff3.txt     man_host.txt      man_lynx.txt        man_photorec.txt    man_sftp.txt        man_until.txt       man_zcat.txt 
-man_diff.txt      man_htop.txt      man_make.txt        man_pico.txt        man_size.txt        man_unzip.txt       man_zcmp.txt 
-man_dig.txt       man_htpasswd.txt  man_man.txt         man_print.txt       man_sleep.txt       man_uptime.txt      man_zip.txt 
-man_dirname.txt   man_ifdown.txt    man_minicom.txt     man_proxy.txt       man_snice.txt       man_users.txt 
-man_dir.txt       man_ifup.txt      man_mlocate.txt     man_ps.txt          man_sort.txt        man_vim.txt 
-man_dmesg.txt     man_iptables.txt  man_modprobe.txt    man_pulseaudio.txt  man_split.txt       man_vi.txt 
-man_dpkg.txt      man_ip.txt        man_mogrify.txt     man_pwd.txt         man_sshfs.txt       man_volname.txt 
-</code> 
- 
  
liste_man.sh.1450741806.txt.gz · Dernière modification : (modification externe)