<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'BASH:  SED/AWK A Variable' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'BASH:  SED/AWK A Variable' posted on the 'LINUX programming' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 12:56:16 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 12:56:16 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>BASH:  SED/AWK A Variable</title>
      <link>http://www.programmersheaven.com/mb/Linux/406427/406427/bash--sedawk-a-variable/</link>
      <description>Hi Im wondering how to extract data from a variable.  I have a variable that contains YYYYMMDD, something like 20091013.  Can I extract the year, YYYY, to varA, the month, MM, to varB and the day, DD to vabC?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/406427/406427/bash--sedawk-a-variable/</guid>
      <pubDate>Wed, 14 Oct 2009 00:38:32 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: BASH:  SED/AWK A Variable</title>
      <link>http://www.programmersheaven.com/mb/Linux/406427/414627/re-bash--sedawk-a-variable/#414627</link>
      <description>here is an example of BASH Substring Extraction&lt;br /&gt;
&lt;br /&gt;
dateString=YYYYMMDD&lt;br /&gt;
#       0-based indexing.&lt;br /&gt;
year=${dateString:0:4}                        # YYYY&lt;br /&gt;
month=${dateString:4:2}                       # MM&lt;br /&gt;
day=${dateString:6:2}                         # DD&lt;br /&gt;
echo "year=$year, month=$month, day=$day"&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/406427/414627/re-bash--sedawk-a-variable/#414627</guid>
      <pubDate>Tue, 16 Mar 2010 14:45:37 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: BASH:  SED/AWK A Variable</title>
      <link>http://www.programmersheaven.com/mb/Linux/406427/417512/re-bash--sedawk-a-variable/#417512</link>
      <description>something like this, I mean&lt;br /&gt;
echo 20191012 | awk '{a=substr($0,1,4); c=substr($0,7,2);b=substr($0,5,2); print(c "." b "." a )}'&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/406427/417512/re-bash--sedawk-a-variable/#417512</guid>
      <pubDate>Mon, 28 Jun 2010 05:14:47 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
  </channel>
</rss>