{"id":47,"date":"2011-05-27T17:43:55","date_gmt":"2011-05-27T21:43:55","guid":{"rendered":"http:\/\/www.logikalsolutions.com\/wordpress\/?p=47"},"modified":"2023-11-27T14:54:07","modified_gmt":"2023-11-27T20:54:07","slug":"substring-exists-in-string","status":"publish","type":"post","link":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/","title":{"rendered":"Substring Exists in String"},"content":{"rendered":"\n<p>Today I got to burn about three hours looking online for an answer to what <a href=\"http:\/\/h41379.www4.hpe.com\/doc\/83final\/9996\/9996pro_107.html\">F$LOCATE()<\/a> makes a simple task. What simple task you ask? Why, I was trying to verify one string existed inside of another string while working in Bash under Linux. You see, I learned to write software on robust systems. Yes, I know, the Linux\/Unix developer motto is \u201ctest nothing, just let it fail\u201d, but I was taught to write good software. Simply posting a blurb about prerequisites in an obscure document file and berating someone who couldn&#8217;t find that doc for not being skilled simply isn&#8217;t in my fiber\u2026well, there might be a chosen few I would do that to, but they deserve it for many other reasons, I certainly wouldn&#8217;t do it to the general public.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How you do it on OpenVMS<\/h2>\n\n\n\n<p>In the world of OpenVMS you would simply use a lexical function F$LOCATE() and it would look much like the following:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#FDF6E3\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"$ l_x = f$locate( &quot;ENDXXX&quot;, &quot;''line_in_str'&quot;)\" style=\"color:#657B83;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki solarized-light\" style=\"background-color: #FDF6E3\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #268BD2\">$<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">l_x<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">=<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">f<\/span><span style=\"color: #268BD2\">$locate<\/span><span style=\"color: #657B83\">( <\/span><span style=\"color: #268BD2\">&quot;ENDXXX&quot;<\/span><span style=\"color: #268BD2\">,<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">&quot;&#39;&#39;line_in_str&#39;&quot;<\/span><span style=\"color: #657B83\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The single ticks around the line_in_str variable had to be there to force DCL to use the value of the variable rather than the name of the variable in the function call.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linux Hell<\/h2>\n\n\n\n<p>After three hours of searching using every variation of \u201clocate\u201d \u201ccontains\u201d \u201cfind\u201d in the Yahoo, Google, and Ask search engines, I finally found ONE document which bothered to give a useful example. Every other method I found involved calling sed or awk with a regular expression which looked like the output from a desktop calculator which was being profusely beaten by a Ballpean hammer.<\/p>\n\n\n\n<p>What was I trying to do? I was trying to verify that SOME postgres directory existed in the current definition of PATH before continuing on. If it didn&#8217;t exist I wanted to force a definition in. Ultimately I ended up with the following snippet of code as the fruits of three hours.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#FDF6E3\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"##\n## Now we need to check for postgres in the path\n##\npp=$PATH\n\nif !( [[ &quot;$pp&quot; =~ &quot;postgres&quot; ]] ); then\n    PATH=\/usr\/lib\/postgresql\/8.3\/bin:$PATH\n    export PATH\n    echo &quot;PATH updated to include postgres&quot;\nfi;\" style=\"color:#657B83;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki solarized-light\" style=\"background-color: #FDF6E3\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #93A1A1; font-style: italic\">##<\/span><\/span>\n<span class=\"line\"><span style=\"color: #93A1A1; font-style: italic\">## Now we need to check for postgres in the path<\/span><\/span>\n<span class=\"line\"><span style=\"color: #93A1A1; font-style: italic\">##<\/span><\/span>\n<span class=\"line\"><span style=\"color: #268BD2\">pp<\/span><span style=\"color: #859900\">=<\/span><span style=\"color: #268BD2\">$PATH<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #859900\">if<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #859900\">!<\/span><span style=\"color: #657B83\">( [[ <\/span><span style=\"color: #2AA198\">&quot;<\/span><span style=\"color: #268BD2\">$pp<\/span><span style=\"color: #2AA198\">&quot;<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #859900\">=~<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">&quot;postgres&quot;<\/span><span style=\"color: #657B83\"> ]] ); <\/span><span style=\"color: #859900\">then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #657B83\">    <\/span><span style=\"color: #268BD2\">PATH<\/span><span style=\"color: #859900\">=<\/span><span style=\"color: #2AA198\">\/usr\/lib\/postgresql\/8.3\/bin:<\/span><span style=\"color: #268BD2\">$PATH<\/span><\/span>\n<span class=\"line\"><span style=\"color: #657B83\">    <\/span><span style=\"color: #586E75; font-weight: bold\">export<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">PATH<\/span><\/span>\n<span class=\"line\"><span style=\"color: #657B83\">    <\/span><span style=\"color: #268BD2\">echo<\/span><span style=\"color: #657B83\"> <\/span><span style=\"color: #2AA198\">&quot;PATH updated to include postgres&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #859900\">fi<\/span><span style=\"color: #657B83\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Once again, Unix\/Linux documentation has proven to be expert friendly. I defy you to get the above mentioned search engines to let you find =~ in a search string. Here is what the GNU version of the Bash documentation had to say:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>An additional binary operator, \u2018 <samp>=~<\/samp>\u2019, is available, with the same precedence as \u2018 <samp>==<\/samp>\u2019 and \u2018 <samp>!=<\/samp>\u2019. When it is used, the string to the right of the operator is considered an extended regular expression and matched accordingly (as in <em>regex<\/em>3)). The return value is 0 if the string matches the pattern, and 1 otherwise. If the regular expression is syntactically incorrect, the conditional expression&#8217;s return value is 2. If the shell option <code>nocasematch<\/code> (see the description of <code>shopt<\/code> in <a href=\"http:\/\/www.gnu.org\/software\/bash\/manual\/bashref.html#Bash-Builtins\">Bash Builtins<\/a>) is enabled, the match is performed without regard to the case of alphabetic characters. Substrings matched by parenthesized subexpressions within the regular expression are saved in the array variable <code>BASH_REMATCH<\/code>. The element of <code>BASH_REMATCH<\/code> with index 0 is the portion of the string matching the entire regular expression. The element of <code>BASH_REMATCH<\/code> with index <var>n<\/var> is the portion of the string matching the <var>n<\/var>th parenthesized subexpression.<\/p>\n<cite>Official documentation<\/cite><\/blockquote>\n\n\n\n<p>That&#8217;s just lovely isn&#8217;t it. Not one single mention of the words \u201clocate\u201d, \u201ccontains\u201d or \u201cexists.\u201d Nothing as straight forward as F$LOCATE.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask? Why, I was trying to verify one string existed inside of another string while working in Bash under Linux. You see, I learned to write software on robust systems. Yes, I know, the Linux\/Unix developer motto is \u201ctest nothing, just let it fail\u201d, but I was taught to write good &hellip; <a title=\"Substring Exists in String\" class=\"bnm-read-more\" href=\"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/\"><span class=\"screen-reader-text\">Substring Exists in String<\/span>Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":6120,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[501,53,500,1475,499],"class_list":["post-47","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-information-technology","tag-find","tag-linux","tag-locate","tag-path-variable","tag-string","bnm-entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Substring Exists in String &#8211; Logikal Blog<\/title>\n<meta name=\"description\" content=\"Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Substring Exists in String &#8211; Logikal Blog\" \/>\n<meta property=\"og:description\" content=\"Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/\" \/>\n<meta property=\"og:site_name\" content=\"Logikal Blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-05-27T21:43:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-27T20:54:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2011\/05\/pexels-photo-16018144.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1880\" \/>\n\t<meta property=\"og:image:height\" content=\"1253\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"seasoned_geek\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"seasoned_geek\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/\"},\"author\":{\"name\":\"seasoned_geek\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\"},\"headline\":\"Substring Exists in String\",\"datePublished\":\"2011-05-27T21:43:55+00:00\",\"dateModified\":\"2023-11-27T20:54:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/\"},\"wordCount\":527,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\"},\"image\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2011\\\/05\\\/pexels-photo-16018144.jpeg\",\"keywords\":[\"find\",\"Linux\",\"locate\",\"PATH variable\",\"string\"],\"articleSection\":[\"Information Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/\",\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/\",\"name\":\"Substring Exists in String &#8211; Logikal Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2011\\\/05\\\/pexels-photo-16018144.jpeg\",\"datePublished\":\"2011-05-27T21:43:55+00:00\",\"dateModified\":\"2023-11-27T20:54:07+00:00\",\"description\":\"Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask?\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2011\\\/05\\\/pexels-photo-16018144.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2011\\\/05\\\/pexels-photo-16018144.jpeg\",\"width\":1880,\"height\":1253,\"caption\":\"Photo by Alberlan Barros on Pexels.com\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/information-technology\\\/substring-exists-in-string\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Substring Exists in String\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/\",\"name\":\"Logikal Blog\",\"description\":\"For people with attention spans longer than a Tweet\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/c077f770ade13de7faaf616c3eac6842\",\"name\":\"seasoned_geek\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\",\"caption\":\"seasoned_geek\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r\"},\"description\":\"Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++\\\/Qt touchscreen\\\/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the \\\"Zinc It!\\\" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome \\\"The Minimum You Need to Know to Be an OpenVMS Application Developer\\\" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there \\\"The Minimum You Need to Know\\\" book series was born. Three years later he wrote his first novel \\\"Infinite Exposure\\\" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of \\\"The Earth That Was\\\" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.\",\"sameAs\":[\"https:\\\/\\\/theminimumyouneedtoknow.com\"],\"url\":\"https:\\\/\\\/www.logikalsolutions.com\\\/wordpress\\\/author\\\/seasoned_geek\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Substring Exists in String &#8211; Logikal Blog","description":"Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask?","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:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/","og_locale":"en_US","og_type":"article","og_title":"Substring Exists in String &#8211; Logikal Blog","og_description":"Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask?","og_url":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/","og_site_name":"Logikal Blog","article_published_time":"2011-05-27T21:43:55+00:00","article_modified_time":"2023-11-27T20:54:07+00:00","og_image":[{"width":1880,"height":1253,"url":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2011\/05\/pexels-photo-16018144.jpeg","type":"image\/jpeg"}],"author":"seasoned_geek","twitter_card":"summary_large_image","twitter_misc":{"Written by":"seasoned_geek","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#article","isPartOf":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/"},"author":{"name":"seasoned_geek","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842"},"headline":"Substring Exists in String","datePublished":"2011-05-27T21:43:55+00:00","dateModified":"2023-11-27T20:54:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/"},"wordCount":527,"commentCount":0,"publisher":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842"},"image":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#primaryimage"},"thumbnailUrl":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2011\/05\/pexels-photo-16018144.jpeg","keywords":["find","Linux","locate","PATH variable","string"],"articleSection":["Information Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/","url":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/","name":"Substring Exists in String &#8211; Logikal Blog","isPartOf":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#primaryimage"},"image":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#primaryimage"},"thumbnailUrl":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2011\/05\/pexels-photo-16018144.jpeg","datePublished":"2011-05-27T21:43:55+00:00","dateModified":"2023-11-27T20:54:07+00:00","description":"Today I got to burn about three hours looking online for an answer to what F$LOCATE() makes a simple task. What simple task you ask?","breadcrumb":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#primaryimage","url":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2011\/05\/pexels-photo-16018144.jpeg","contentUrl":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-content\/uploads\/2011\/05\/pexels-photo-16018144.jpeg","width":1880,"height":1253,"caption":"Photo by Alberlan Barros on Pexels.com"},{"@type":"BreadcrumbList","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/information-technology\/substring-exists-in-string\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.logikalsolutions.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Substring Exists in String"}]},{"@type":"WebSite","@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#website","url":"https:\/\/www.logikalsolutions.com\/wordpress\/","name":"Logikal Blog","description":"For people with attention spans longer than a Tweet","publisher":{"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.logikalsolutions.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.logikalsolutions.com\/wordpress\/#\/schema\/person\/c077f770ade13de7faaf616c3eac6842","name":"seasoned_geek","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r","url":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r","caption":"seasoned_geek"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/ae9adac14079d84b909e635d7af986fe4568053af4fd9ff8d4109298c392493e?s=96&d=mm&r=r"},"description":"Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++\/Qt touchscreen\/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the \"Zinc It!\" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome \"The Minimum You Need to Know to Be an OpenVMS Application Developer\" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there \"The Minimum You Need to Know\" book series was born. Three years later he wrote his first novel \"Infinite Exposure\" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of \"The Earth That Was\" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.","sameAs":["https:\/\/theminimumyouneedtoknow.com"],"url":"https:\/\/www.logikalsolutions.com\/wordpress\/author\/seasoned_geek\/"}]}},"_links":{"self":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":0,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/media\/6120"}],"wp:attachment":[{"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.logikalsolutions.com\/wordpress\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}