{"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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-2614","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Retour de script - workboot<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/workboot.fr\/ciela\/retour-de-script\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Retour de script - workboot\" \/>\n<meta property=\"og:description\" content=\"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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/workboot.fr\/ciela\/retour-de-script\/\" \/>\n<meta property=\"og:site_name\" content=\"workboot\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-18T13:50:38+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/retour-de-script\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/retour-de-script\\\/\",\"name\":\"Retour de script - workboot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\"},\"datePublished\":\"2025-07-18T13:50:23+00:00\",\"dateModified\":\"2025-07-18T13:50:38+00:00\",\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/workboot.fr\\\/ciela\\\/retour-de-script\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"name\":\"workboot\",\"description\":\"Open Source, Open Minds \",\"publisher\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\",\"name\":\"workboot\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"width\":1024,\"height\":950,\"caption\":\"workboot\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Retour de script - workboot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/workboot.fr\/ciela\/retour-de-script\/","og_locale":"fr_FR","og_type":"article","og_title":"Retour de script - workboot","og_description":"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 [&hellip;]","og_url":"https:\/\/workboot.fr\/ciela\/retour-de-script\/","og_site_name":"workboot","article_modified_time":"2025-07-18T13:50:38+00:00","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/workboot.fr\/ciela\/retour-de-script\/","url":"https:\/\/workboot.fr\/ciela\/retour-de-script\/","name":"Retour de script - workboot","isPartOf":{"@id":"https:\/\/workboot.fr\/ciela\/#website"},"datePublished":"2025-07-18T13:50:23+00:00","dateModified":"2025-07-18T13:50:38+00:00","inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/workboot.fr\/ciela\/retour-de-script\/"]}]},{"@type":"WebSite","@id":"https:\/\/workboot.fr\/ciela\/#website","url":"https:\/\/workboot.fr\/ciela\/","name":"workboot","description":"Open Source, Open Minds ","publisher":{"@id":"https:\/\/workboot.fr\/ciela\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/workboot.fr\/ciela\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/workboot.fr\/ciela\/#organization","name":"workboot","url":"https:\/\/workboot.fr\/ciela\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","width":1024,"height":950,"caption":"workboot"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/"}}]}},"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 [&hellip;]","_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}]}}