{"id":2614,"date":"2025-07-18T14:50:23","date_gmt":"2025-07-18T13:50:23","guid":{"rendered":"https:\/\/workboot.fr\/ciela\/?page_id=2614"},"modified":"2025-07-18T14:50:38","modified_gmt":"2025-07-18T13:50:38","slug":"retour-de-script","status":"publish","type":"page","link":"https:\/\/workboot.fr\/ciela\/retour-de-script\/","title":{"rendered":"Retour de script"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">ou retour d&rsquo;un code ex\u00e9cutable C<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">la variable $?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Exemple :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bruno@elliott:~$ bash\nbruno@elliott:~$ bash\nbruno@elliott:~$ ps\n    PID TTY          TIME CMD\n   5396 pts\/1    00:00:00 bash\n   5531 pts\/1    00:00:00 bash\n   5536 pts\/1    00:00:00 bash\n   5541 pts\/1    00:00:00 ps\nbruno@elliott:~$ exit <mark style=\"background-color:rgba(0, 0, 0, 0);color:#fcb900\" class=\"has-inline-color\">3<\/mark>\nexit\nbruno@elliott:~$ echo $?\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#fcb900\" class=\"has-inline-color\">3<\/mark>\nbruno@elliott:~$ <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>bruno@elliott:~$ ls --duchmol\nls : option non reconnue '--duchmol'\nSaisissez \u00ab ls --help \u00bb pour plus d'informations.\nbruno@elliott:~$ echo $?\n2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">si on fait un ls -l #sans erreur , il va renvoyer  vrai 0 ..<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\necho -n \"votre prenom en minuscule svp:\"\nread nom\nif &#91; $nom == \"bruno\" ]\nthen \necho \"Salut Boss !\"\nexit 0\nelse \necho \"T Ki ?\"\nexit 1\nfi<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Exemple de code renvoyant un \u00ab\u00a0code d&rsquo;erreur\u00a0\u00bb si pas bruno !!! le Boss , un code d&rsquo;erreur sera diff\u00e9rent de 0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ou retour d&rsquo;un code ex\u00e9cutable C la variable $? Exemple : si on fait un ls -l #sans erreur , il va renvoyer vrai 0 .. Exemple de code renvoyant un \u00ab\u00a0code d&rsquo;erreur\u00a0\u00bb si pas bruno !!! le Boss , un code d&rsquo;erreur sera diff\u00e9rent de 0<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-2614","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/workboot.fr\/ciela\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"ou retour d&rsquo;un code ex\u00e9cutable C la variable $? Exemple : si on fait un ls -l #sans erreur , il va renvoyer vrai 0 .. Exemple de code renvoyant un \u00ab\u00a0code d&rsquo;erreur\u00a0\u00bb si pas bruno !!! le Boss , un code d&rsquo;erreur sera diff\u00e9rent de 0","_links":{"self":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/2614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/comments?post=2614"}],"version-history":[{"count":2,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/2614\/revisions"}],"predecessor-version":[{"id":2617,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/2614\/revisions\/2617"}],"wp:attachment":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/media?parent=2614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}