{"id":29393,"date":"2025-09-12T12:45:39","date_gmt":"2025-09-12T09:45:39","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/"},"modified":"2025-09-12T12:45:39","modified_gmt":"2025-09-12T09:45:39","slug":"how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/","title":{"rendered":"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)"},"content":{"rendered":"<p># Bash&#8217;te Son Kelimenin Nas\u0131l Al\u0131naca\u011f\u0131 (\u00d6rneklerle)<\/p>\n<p>Bir metin dosyas\u0131ndaki son kelimeyi almak, bir log dosyas\u0131n\u0131 i\u015flemek, bir komutun \u00e7\u0131kt\u0131s\u0131n\u0131 analiz etmek veya bir program\u0131n davran\u0131\u015f\u0131n\u0131 kontrol etmek gibi bir\u00e7ok Bash beti\u011finde s\u0131k\u00e7a kar\u015f\u0131la\u015f\u0131lan bir g\u00f6revdir.  Bu makalede, Bash&#8217;te bir dizinin son kelimesini nas\u0131l alaca\u011f\u0131n\u0131z\u0131 ad\u0131m ad\u0131m, yeni ba\u015flayanlardan ileri seviye kullan\u0131c\u0131lara kadar kapsayacak \u015fekilde a\u00e7\u0131klayaca\u011f\u0131z.  Farkl\u0131 y\u00f6ntemleri kar\u015f\u0131la\u015ft\u0131racak, performans optimizasyonuna de\u011finecek ve ger\u00e7ek d\u00fcnya senaryolar\u0131na \u00f6rnekler verece\u011fiz.<\/p>\n<p><strong>\u00d6\u011frenme Yol Haritas\u0131<\/strong><\/p>\n<p>Bu makale, Bash&#8217;te son kelimenin nas\u0131l al\u0131naca\u011f\u0131n\u0131 \u00f6\u011frenmek i\u00e7in \u00fc\u00e7 a\u015famal\u0131 bir yol haritas\u0131 sunar:<\/p>\n<p>* <strong>Yeni Ba\u015flayan:<\/strong> Basit y\u00f6ntemler, ad\u0131m ad\u0131m a\u00e7\u0131klamalar ve temel kod \u00f6rnekleri.<br \/>\n* <strong>Orta Seviye:<\/strong> Ger\u00e7ek d\u00fcnya senaryolar\u0131, optimizasyon ipu\u00e7lar\u0131 ve daha karma\u015f\u0131k \u00f6rnekler.<br \/>\n* <strong>\u0130leri Seviye:<\/strong> Performans analizi, edge case&#8217;ler ve geli\u015fmi\u015f teknikler.<\/p>\n<p><strong>Bash Temelleri: Diziler ve Kelime \u0130\u015fleme<\/strong><\/p>\n<p>Bash, kelimeleri bo\u015fluk karakterleriyle ay\u0131rarak i\u015fledi\u011fi bir komut yorumlay\u0131c\u0131s\u0131d\u0131r.  Bir dizideki kelimeleri i\u015flemek i\u00e7in, de\u011fi\u015fkenlere de\u011fer atamay\u0131 ve bu de\u011ferleri manip\u00fcle etmeyi bilmemiz gerekir.  \u00d6rne\u011fin, <code class=\"language-\">myString=\"Bu bir \u00f6rnek c\u00fcmle\"<\/code>  komutu ile &#8220;myString&#8221; de\u011fi\u015fkenine bir c\u00fcmle atar\u0131z.  Bu c\u00fcmledeki kelimeler bo\u015fluk karakterleri ile ayr\u0131lm\u0131\u015ft\u0131r.  Bu ayr\u0131m\u0131 kullanarak son kelimeyi elde edece\u011fiz.<\/p>\n<p><strong>Yeni Ba\u015flayanlar \u0130\u00e7in: <code class=\"language-\">awk<\/code> Komutu ile Son Kelimenin Al\u0131nmas\u0131<\/strong><\/p>\n<p>En basit y\u00f6ntemlerden biri, <code class=\"language-\">awk<\/code> komutunu kullanmakt\u0131r. <code class=\"language-\">awk<\/code>, metin dosyalar\u0131n\u0131 ve dizileri i\u015flemek i\u00e7in g\u00fc\u00e7l\u00fc bir ara\u00e7t\u0131r.  Son kelimeyi almak i\u00e7in, <code class=\"language-\">awk<\/code>&#8216;\u0131n <code class=\"language-\">$NF<\/code> de\u011fi\u015fkenini kullanabiliriz. <code class=\"language-\">$NF<\/code>, bir sat\u0131rdaki son kelimeyi temsil eder.<\/p>\n<pre class=\"language-bash\"><code>myString=&quot;Bu bir \u00f6rnek c\u00fcmledir&quot;\nlastWord=$(echo &quot;$myString&quot; | awk '{print $NF}')\necho &quot;Son kelime: $lastWord&quot;<\/code><\/pre>\n<p>Bu kod, \u00f6nce <code class=\"language-\">myString<\/code> de\u011fi\u015fkeninin de\u011ferini <code class=\"language-\">echo<\/code> komutu ile ekrana yazar. Ard\u0131ndan, <code class=\"language-\">|<\/code> (pipe) operat\u00f6r\u00fc ile \u00e7\u0131kt\u0131y\u0131 <code class=\"language-\">awk '{print $NF}'<\/code> komutuna g\u00f6nderir.  <code class=\"language-\">awk<\/code> komutu, her sat\u0131rdaki son kelimeyi (<code class=\"language-\">$NF<\/code>) al\u0131r ve bunu <code class=\"language-\">lastWord<\/code> de\u011fi\u015fkenine atar. Son olarak, <code class=\"language-\">echo<\/code> komutu ile <code class=\"language-\">lastWord<\/code> de\u011fi\u015fkeninin de\u011feri (son kelime) ekrana yazd\u0131r\u0131l\u0131r.<\/p>\n<p><strong>Orta Seviye: Parametre Geni\u015fletme ve Dizeler \u00dczerinde \u0130\u015flemler<\/strong><\/p>\n<p><code class=\"language-\">awk<\/code> kullan\u0131m\u0131 basittir, ancak daha karma\u015f\u0131k senaryolarda parametre geni\u015fletme ve dizi manip\u00fclasyonu daha esnek \u00e7\u00f6z\u00fcmler sunar.  \u00d6rne\u011fin, c\u00fcmlede noktalama i\u015faretleri varsa <code class=\"language-\">awk<\/code> tek ba\u015f\u0131na yeterli olmayabilir.  Bu durumda, \u00f6nce noktalama i\u015faretlerini temizleyip sonra son kelimeyi alabiliriz.<\/p>\n<pre class=\"language-bash\"><code>myString=&quot;Bu, bir \u00f6rnek c\u00fcmledir.&quot;\nmyString=&quot;${myString\/\/[[:punct:]]\/}&quot; # Noktalama i\u015faretlerini kald\u0131r\u0131r\nlastWord=$(echo &quot;$myString&quot; | awk '{print $NF}')\necho &quot;Son kelime: $lastWord&quot;<\/code><\/pre>\n<p>Bu \u00f6rnekte,  <code class=\"language-\">\"${myString\/\/[[:punct:]]\/}\"<\/code>  parametre geni\u015fletmesi, <code class=\"language-\">myString<\/code> de\u011fi\u015fkenindeki t\u00fcm noktalama i\u015faretlerini kald\u0131r\u0131r.  Daha sonra, <code class=\"language-\">awk<\/code> komutu temizlenmi\u015f dizideki son kelimeyi al\u0131r.  Bu y\u00f6ntem, daha sa\u011flam ve \u00e7e\u015fitli durumlarda \u00e7al\u0131\u015fabilir.<\/p>\n<p><strong>Ger\u00e7ek D\u00fcnya \u00d6rne\u011fi:<\/strong> Bir log dosyas\u0131ndan son hata mesaj\u0131n\u0131 almak istedi\u011finizi d\u00fc\u015f\u00fcn\u00fcn.  Log dosyas\u0131ndaki her sat\u0131r\u0131 i\u015fleyerek, her sat\u0131r\u0131n son kelimesini (muhtemelen hata kodu) alabilirsiniz.  Bu, hata analizi ve otomasyon i\u00e7in faydal\u0131 olabilir.<\/p>\n<p><strong>\u0130leri Seviye:  Performans Optimizasyonu ve Edge Case&#8217;ler<\/strong><\/p>\n<p>\u00c7ok b\u00fcy\u00fck dosyalar veya y\u00fcksek performans gerektiren uygulamalar i\u00e7in, <code class=\"language-\">awk<\/code>&#8216;\u0131n performans\u0131 yeterli olmayabilir.  Bu durumlarda, daha h\u0131zl\u0131 y\u00f6ntemler kullanmal\u0131y\u0131z.  \u00d6rne\u011fin, <code class=\"language-\">sed<\/code> komutu ile son kelimenin al\u0131nmas\u0131 daha h\u0131zl\u0131 olabilir.<\/p>\n<pre class=\"language-bash\"><code>myString=&quot;Bu bir \u00f6rnek c\u00fcmledir&quot;\nlastWord=$(echo &quot;$myString&quot; | sed 's\/.* \/\/')\necho &quot;Son kelime: $lastWord&quot;<\/code><\/pre>\n<p>Bu kod, <code class=\"language-\">sed<\/code> komutunu kullanarak dizinin son bo\u015fluktan sonraki k\u0131sm\u0131n\u0131 al\u0131r.  <code class=\"language-\">s\/.* \/\/<\/code> ifadesi, dizinin ba\u015f\u0131ndan son bo\u015flu\u011fa kadar olan k\u0131sm\u0131 bo\u015flukla de\u011fi\u015ftirir, b\u00f6ylece sadece son kelime kal\u0131r.  Bu y\u00f6ntem, <code class=\"language-\">awk<\/code>&#8216;tan daha h\u0131zl\u0131 olabilir, \u00f6zellikle b\u00fcy\u00fck diziler i\u00e7in.<\/p>\n<p><strong>Performans Analizi:<\/strong>  <code class=\"language-\">time<\/code> komutu ile farkl\u0131 y\u00f6ntemlerin performans\u0131n\u0131 kar\u015f\u0131la\u015ft\u0131rabilirsiniz.  \u00d6rne\u011fin,  <code class=\"language-\">time awk '{print $NF}' < b\u00fcy\u00fck_dosya.txt<\/code>  ve  <code class=\"language-\">time sed 's\/.* \/\/' < b\u00fcy\u00fck_dosya.txt<\/code>  komutlar\u0131n\u0131 \u00e7al\u0131\u015ft\u0131rarak, hangi y\u00f6ntemin daha h\u0131zl\u0131 oldu\u011funu g\u00f6rebilirsiniz.<\/p>\n<p><strong>Edge Case'ler:<\/strong>  Bo\u015f bir dizi, sadece bir kelime i\u00e7eren bir dizi veya \u00e7oklu bo\u015fluk i\u00e7eren diziler gibi \u00f6zel durumlar\u0131 (edge case'leri) ele almal\u0131y\u0131z.  Bu durumlar i\u00e7in, ek kontroller ekleyerek kodun daha sa\u011flam olmas\u0131n\u0131 sa\u011flayabiliriz.<\/p>\n<p><strong>Bash'te Son Kelimenin Al\u0131nmas\u0131 \u0130\u00e7in Fonksiyonel Bir Yakla\u015f\u0131m<\/strong><\/p>\n<p>Daha okunabilir ve tekrar kullan\u0131labilir bir kod i\u00e7in, son kelimeyi alan bir fonksiyon yazabiliriz:<\/p>\n<pre class=\"language-bash\"><code>getLastWord() {\n  local string=&quot;$1&quot;\n  string=&quot;${string\/\/[[:punct:]]\/}&quot;\n  echo &quot;${string<strong>* }&quot;<\/strong>\n}\n\nmyString=&quot;Bu, bir \u00f6rnek c\u00fcmledir.&quot;\nlastWord=$(getLastWord &quot;$myString&quot;)\necho &quot;Son kelime: $lastWord&quot;<\/code><\/pre>\n<p>Bu fonksiyon, verilen bir dizinin son kelimesini d\u00f6nd\u00fcr\u00fcr.  Noktalama i\u015faretlerini temizler ve <code class=\"language-\">\"${string<strong>* }\"<\/code> parametre geni\u015fletmesi ile son bo\u015fluktan sonraki k\u0131sm\u0131 al\u0131r.  Bu yakla\u015f\u0131m, kodun daha d\u00fczenli ve anla\u015f\u0131l\u0131r olmas\u0131n\u0131 sa\u011flar.<\/strong><\/p>\n<p><strong>Sonu\u00e7<\/strong><\/p>\n<p>Bash'te bir dizinin son kelimesini almak i\u00e7in bir\u00e7ok y\u00f6ntem vard\u0131r.  <code class=\"language-\">awk<\/code>, <code class=\"language-\">sed<\/code> ve parametre geni\u015fletme gibi ara\u00e7lar, farkl\u0131 senaryolarda kullan\u0131labilir.  Performans ve okunabilirlik i\u00e7in en uygun y\u00f6ntemi se\u00e7mek \u00f6nemlidir.  Bu makalede ele ald\u0131\u011f\u0131m\u0131z y\u00f6ntemler, farkl\u0131 ihtiya\u00e7lara g\u00f6re uyarlanabilir ve daha karma\u015f\u0131k senaryolarda kullan\u0131labilir.  Unutmay\u0131n ki, b\u00fcy\u00fck veri k\u00fcmeleri i\u00e7in performans optimizasyonu kritik \u00f6neme sahiptir.  Uygun y\u00f6ntemi se\u00e7mek, beti\u011finizin verimlili\u011fini b\u00fcy\u00fck \u00f6l\u00e7\u00fcde etkiler.<\/p>\n<p><strong>S\u0131k\u00e7a Sorulan Sorular (SSS):<\/strong><\/p>\n<p>1. <strong>\u00c7oklu bo\u015fluklar varsa ne olur?<\/strong>  <code class=\"language-\">sed 's\/.* \/\/'<\/code> veya <code class=\"language-\">\"${string<strong>* }\"<\/code> gibi y\u00f6ntemler \u00e7oklu bo\u015fluklar\u0131 do\u011fru bir \u015fekilde ele al\u0131r.<\/strong><br \/>\n2. <strong>Bo\u015f bir dizi verilirse ne olur?<\/strong>  Fonksiyonel yakla\u015f\u0131mda bo\u015f bir dizi verildi\u011finde bo\u015f bir \u00e7\u0131kt\u0131 d\u00f6nd\u00fcr\u00fcl\u00fcr.<br \/>\n3. <strong>Sadece bir kelime i\u00e7eren bir dizi verilirse ne olur?<\/strong>  T\u00fcm y\u00f6ntemler do\u011fru bir \u015fekilde tek kelimeyi d\u00f6nd\u00fcr\u00fcr.<br \/>\n4. <strong>\u00d6zel karakterler i\u00e7eren diziler i\u00e7in nas\u0131l bir yakla\u015f\u0131m izlenmeli?<\/strong>  Noktalama i\u015faretlerini temizlemek i\u00e7in <code class=\"language-\">tr<\/code> komutu veya parametre geni\u015fletme kullan\u0131labilir.<br \/>\n5. <strong>Performans\u0131 nas\u0131l optimize edebilirim?<\/strong>  B\u00fcy\u00fck dosyalar i\u00e7in <code class=\"language-\">sed<\/code> veya  <code class=\"language-\">cut<\/code> komutlar\u0131n\u0131 deneyebilir, ayr\u0131ca  <code class=\"language-\">xargs<\/code> gibi ara\u00e7lar\u0131 kullanabilirsiniz.<\/p>\n<p>Yazar: Fatih Soysal<\/p>\n","protected":false},"excerpt":{"rendered":"# Bash&#8217;te Son Kelimenin Nas\u0131l Al\u0131naca\u011f\u0131 (\u00d6rneklerle) Bir metin dosyas\u0131ndaki son kelimeyi almak, bir log dosyas\u0131n\u0131 i\u015flemek, bir&hellip;","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1328],"tags":[],"class_list":{"0":"post-29393","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-bash","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)<\/title>\n<meta name=\"description\" content=\"Hi\u00e7bir etiketi bulunamad\u0131.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)\" \/>\n<meta property=\"og:description\" content=\"Hi\u00e7bir etiketi bulunamad\u0131.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-12T09:45:39+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)\",\"datePublished\":\"2025-09-12T09:45:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\"},\"wordCount\":953,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Bash\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\",\"name\":\"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-09-12T09:45:39+00:00\",\"description\":\"Hi\u00e7bir etiketi bulunamad\u0131.\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)","description":"Hi\u00e7bir etiketi bulunamad\u0131.","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:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/","og_locale":"tr_TR","og_type":"article","og_title":"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)","og_description":"Hi\u00e7bir etiketi bulunamad\u0131.","og_url":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-09-12T09:45:39+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"6 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)","datePublished":"2025-09-12T09:45:39+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/"},"wordCount":953,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Bash"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/","url":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/","name":"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-09-12T09:45:39+00:00","description":"Hi\u00e7bir etiketi bulunamad\u0131.","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/how-to-get-last-word-of-a-string-in-bash-with-examples-ceviri\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Get Last Word of a String in Bash (With Examples) (\u00c7eviri)"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/29393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=29393"}],"version-history":[{"count":0,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/29393\/revisions"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=29393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=29393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=29393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}