<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Sun May 26, 2013 6:25 am by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Sun May 26, 2013 6:25 am</pubDate>
  <lastBuildDate>Sun May 26, 2013 6:25 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>quick awk-to-sed question</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=89475#89475</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=3883'&gt;silly_xp_user&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat May 22, 2010 6:56 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hello, can someone please assist.&lt;br /&gt;
I would like to know how the following might be done in sed.&lt;br /&gt;
I have read sed1liners and various other sed faqs but cannot quite work this one out.&lt;br /&gt;
&lt;br /&gt;
Thanks for any constructive help given.&lt;br /&gt;
&lt;br /&gt;
Hal&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;#!/bin/bash&lt;br /&gt;
#Align second field of each line offset 15.&lt;br /&gt;
#How would you do this with sed?&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt;&amp;lt; EOF | awk '&amp;#123; printf &amp;quot;%-15s &amp;quot;,$1; for&amp;#40;i=2;i&amp;lt;=NF;i++&amp;#41; printf &amp;quot;%s &amp;quot;,$i ; print &amp;quot;&amp;quot;&amp;#125;'&lt;br /&gt;
1 one&lt;br /&gt;
10 ten&lt;br /&gt;
300 three hundred&lt;br /&gt;
1000 one thousand&lt;br /&gt;
90042 ninety thousand and forty two&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
#- gives this output without the hashes &amp;#40;#&amp;#41;.&lt;br /&gt;
#1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;one&lt;br /&gt;
#10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ten&lt;br /&gt;
#300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;three hundred&lt;br /&gt;
#1000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; one thousand&lt;br /&gt;
#90042&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ninety thousand and forty two&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=89475#89475</comments>
                                        <author>silly_xp_user</author>
                                        <pubDate>Sat May 22, 2010 6:56 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=89475#89475</guid>
                                      </item></channel></rss>