issue219:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue219:c_c [2025/07/17 18:03] – créée philou511 | issue219:c_c [2025/07/30 06:50] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Linux help | + | **I just had a question as to where to find help in Ubuntu. While the man pages are there, they are sometimes so bad, I have no idea what they are trying to say. I realise these pages were written for eggheads, by eggheads, so maybe we can help ourselves a bit? |
- | I just had a question as to where to find help in Ubuntu. While the man pages are there, they are sometimes so bad, I have no idea what they are trying to say. I realise these pages were written for eggheads, by eggheads, so maybe we can help ourselves a bit? | + | Open a terminal and let’s get busy. Try this on for size: |
- | + | ||
- | Open a terminal and let’s get busy. Try this on for size: help printf | + | |
+ | help printf | ||
You should see something like the above. Now go look at the man page for printf. | You should see something like the above. Now go look at the man page for printf. | ||
Ligne 10: | Ligne 9: | ||
You may say, all good and well, but as they say in the adverts, wait, there’s more! | You may say, all good and well, but as they say in the adverts, wait, there’s more! | ||
- | Try that same command with tack d, like so: help -d printf | + | Try that same command with tack d, like so: |
- | + | ||
- | Like so: | + | |
+ | help -d printf | ||
Right, you can see where I am going here, so I will not add screenshots of everything; if you are a n00b, I want you to actually do it to see the output change. | Right, you can see where I am going here, so I will not add screenshots of everything; if you are a n00b, I want you to actually do it to see the output change. | ||
Ligne 21: | Ligne 19: | ||
Option: -d | Option: -d | ||
- | Display a short description for each topic. | + | Display a short description for each topic.** |
+ | Aide pour Linux | ||
- | Now I want you to repeat that with the -m instead of the -d. | + | Je me demandais juste où trouver de l'aide sous Ubuntu. Bien que les pages de manuel soient là, elles sont parfois si mauvaises que je n'ai aucune idée de ce qu' |
+ | |||
+ | Ouvrez un terminal et mettons-nous au travail. Essayez ceci : | ||
+ | |||
+ | help printf | ||
+ | |||
+ | Vous devriez voir quelque chose comme ci-dessus. Maintenant, allez voir la page de manuel de printf. | ||
+ | |||
+ | Vous vous dites peut-être : | ||
+ | |||
+ | Essayez la même commande avec tiret d, comme ceci : | ||
+ | |||
+ | help -d printf | ||
+ | |||
+ | Bien, vous voyez où je veux en venir, donc je ne vais pas ajouter de captures d' | ||
+ | |||
+ | Maintenant, on sait. | ||
+ | |||
+ | Option : -d | ||
+ | |||
+ | Afficher une courte description pour chaque sujet. | ||
+ | |||
+ | |||
+ | **Now I want you to repeat that with the -m instead of the -d. | ||
You will notice that it looks a bit more like a man page. What do you think the -m is for? Yes! | You will notice that it looks a bit more like a man page. What do you think the -m is for? Yes! | ||
Ligne 42: | Ligne 64: | ||
The other thing I want to address in this CnC is echo. Yes, that thing you use to print something to the screen. I want you to try this: | The other thing I want to address in this CnC is echo. Yes, that thing you use to print something to the screen. I want you to try this: | ||
+ | It is just a quote from ‘Bridge to Tarabithia’, | ||
- | It is just a quote from ‘Bridge to Tarabithia’, but you can type anything. Put as many spaces as you like between the words. See what you get. So if you have some horribly formatted text, you can use echo to straighten it out for you; neat, hey? Simply type echo, then copy and paste the badly formatted text in and press enter. There may also be the odd occasion where you need to actually push spaces to the screen. The way to do that is to encapsulate the text with quotes. | + | Maintenant, je veux que vous répétiez cela avec -m au lieu de -d. |
+ | Vous remarquerez que cela ressemble un peu à une page de manuel. À quoi sert -m, selon vous ? Oui ! | ||
- | Obviously, if the text has no quotes, it does not matter which quotes you use, double or single. Usually one uses these quotes to insert escape characters. Quoted lines can include special escaped characters recognized by the echo command (when using echo -e). | + | Option : -m |
+ | |||
+ | Afficher l' | ||
+ | |||
+ | Vous conviendrez que c'est mieux que la page de manuel. En cas de doute, consultez à nouveau la page de manuel. | ||
+ | |||
+ | Si nous voulions voir la syntaxe, que pensez-vous qu'on utiliserait ? | ||
+ | |||
+ | Option : -s | ||
+ | |||
+ | Afficher un court résumé d' | ||
+ | |||
+ | L' | ||
+ | |||
+ | C'est juste une citation de « Bridge to Tarabithia », | ||
+ | |||
+ | |||
+ | **Obviously, if the text has no quotes, it does not matter which quotes you use, double or single. Usually one uses these quotes to insert escape characters. Quoted lines can include special escaped characters recognized by the echo command (when using echo -e). | ||
Try: echo -e “ a new line\n here and also a \t tab” | Try: echo -e “ a new line\n here and also a \t tab” | ||
Ligne 58: | Ligne 99: | ||
If the program you installed does not seem to respond to any of the usual channels, you can try the “Windows” way by using “/?” instead. Sometimes these things are written with Windows in mind and somehow find their way into the Linux ecosystem. | If the program you installed does not seem to respond to any of the usual channels, you can try the “Windows” way by using “/?” instead. Sometimes these things are written with Windows in mind and somehow find their way into the Linux ecosystem. | ||
- | Remember that as per my answer in QnA, there is always F1. F1 from within a program, is usually help, though it will not help you on the command line. | + | Remember that as per my answer in QnA, there is always F1. F1 from within a program, is usually help, though it will not help you on the command line. |
OK, I hope I helped someone find help and gave one of you, at least, a handy tip to format text. | OK, I hope I helped someone find help and gave one of you, at least, a handy tip to format text. | ||
- | If you think there are errors here: misc@fullcirclemagazine.org | + | If you think there are errors here: misc@fullcirclemagazine.org |
+ | |||
+ | Bien sûr, si le texte ne contient pas de guillemets, peu importe les guillemets utilisés, simples ou doubles. On utilise généralement ces guillemets pour insérer des caractères d' | ||
+ | |||
+ | Essayez : | ||
+ | |||
+ | echo -e « un saut de ligne\n ici et aussi une tabulation \t » | ||
+ | |||
+ | Vous ne connaissez peut-être pas tous ces caractères d' | ||
+ | |||
+ | Bravo à ceux d' | ||
+ | |||
+ | Sachez simplement que certaines commandes sont installées avec des applications externes et peuvent ne pas avoir de fichier d'aide ni de page de manuel. Dans ce cas, vous devrez généralement essayer -h ou --help comme alternative. Je vous conseille de vérifier ce que vous installez, par exemple depuis GitHub, en lisant la documentation de la nouvelle commande. Certains programmes n' | ||
+ | |||
+ | Si le programme que vous avez installé ne semble répondre à aucun des canaux habituels, vous pouvez essayer la méthode « Windows » en utilisant « / ?». Parfois, ces programmes sont conçus pour Windows et finissent par s' | ||
+ | |||
+ | N' | ||
+ | |||
+ | J' | ||
+ | |||
+ | Si vous pensez qu'il y a des erreurs ici : misc@fullcirclemagazine.org | ||
+ | |||
issue219/c_c.1752768183.txt.gz · Dernière modification : 2025/07/17 18:03 de philou511