<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: seq for OS X</title>
	<atom:link href="http://scruss.com/blog/2008/02/08/seq-for-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/</link>
	<description>"I want to be a loony ... it's quite an important thing" - Graham Chapman</description>
	<pubDate>Fri, 09 Jan 2009 12:51:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: scruss</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-107791</link>
		<dc:creator>scruss</dc:creator>
		<pubDate>Tue, 24 Jun 2008 02:20:36 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-107791</guid>
		<description>erm, but the sh-utils build trick is platform-neutral.</description>
		<content:encoded><![CDATA[<div class='microid-39e9203943c28eb09e49ddfabd32604466ddf22a'>erm, but the sh-utils build trick is platform-neutral.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: someone</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-107779</link>
		<dc:creator>someone</dc:creator>
		<pubDate>Mon, 23 Jun 2008 22:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-107779</guid>
		<description>Thanks, but the seq builds are for PPC and not for intel.

but the macports idea is good!</description>
		<content:encoded><![CDATA[<div class='microid-9afa1dce4d1546217211299185ea2863b6ae0d06'>Thanks, but the seq builds are for PPC and not for intel.</p>
<p>but the macports idea is good!</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: scruss</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-105273</link>
		<dc:creator>scruss</dc:creator>
		<pubDate>Wed, 28 May 2008 12:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-105273</guid>
		<description>thanks. Wordpress may have munged the quotes - I hate when it does that.</description>
		<content:encoded><![CDATA[<div class='microid-39e9203943c28eb09e49ddfabd32604466ddf22a'>thanks. Wordpress may have munged the quotes - I hate when it does that.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: prof_k</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-105269</link>
		<dc:creator>prof_k</dc:creator>
		<pubDate>Wed, 28 May 2008 11:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-105269</guid>
		<description>Just an improvement of the bash script (which doesn't yet work properly for jot with an increment). Further improvement is welcome !

#!/bin/bash
# marks rude seq replacement for osx.

# set -ex

method=1

case ${method} in 
        1)
# a simple bash script:
if [ $# -eq 2 ]
then
let from="$1";
let to="$2";
let step=1
elif [ $# -eq 1 ]
then
let from="0";
let to="$1";
let step=1
elif [ $# -eq 3 ]
then
let from="$1"
let to="$3"
let step="$2"
else
echo "USAGE: seq [num from] [[num step]] [num to]"
exit 1;
fi

while [ $from -le $to ]
do
printf "$from \n";
from=$[$from+$step]
done
;;
        2)
# Using the jot command: 

if [ $# -eq 2 ]
then
let numstep=`expr '(' $2 - $1 + 1 ')' `
jot $numstep $1 $2
elif [ $# -eq 3 ]
then
let numstep=`expr '(' $3 - $1 + 1 ')' / $2 `
let to=`expr $3 - '(' '(' $3 - $1 + 1 ')' % $numstep ')' `
jot ${numstep} $1 $to
else 
echo "USAGE: seq [num from] [[num step]] [num to]"
exit 1;
fi
;;
esac</description>
		<content:encoded><![CDATA[<div class='microid-3e7039fc3f1ee1b7f885dd4d5b0a815ec404d4ef'>Just an improvement of the bash script (which doesn&#8217;t yet work properly for jot with an increment). Further improvement is welcome !</p>
<p>#!/bin/bash<br />
# marks rude seq replacement for osx.</p>
<p># set -ex</p>
<p>method=1</p>
<p>case ${method} in<br />
        1)<br />
# a simple bash script:<br />
if [ $# -eq 2 ]<br />
then<br />
let from=&#8221;$1&#8243;;<br />
let to=&#8221;$2&#8243;;<br />
let step=1<br />
elif [ $# -eq 1 ]<br />
then<br />
let from=&#8221;0&#8243;;<br />
let to=&#8221;$1&#8243;;<br />
let step=1<br />
elif [ $# -eq 3 ]<br />
then<br />
let from=&#8221;$1&#8243;<br />
let to=&#8221;$3&#8243;<br />
let step=&#8221;$2&#8243;<br />
else<br />
echo &#8220;USAGE: seq [num from] [[num step]] [num to]&#8221;<br />
exit 1;<br />
fi</p>
<p>while [ $from -le $to ]<br />
do<br />
printf &#8220;$from \n&#8221;;<br />
from=$[$from+$step]<br />
done<br />
;;<br />
        2)<br />
# Using the jot command: </p>
<p>if [ $# -eq 2 ]<br />
then<br />
let numstep=`expr &#8216;(&#8217; $2 - $1 + 1 &#8216;)&#8217; `<br />
jot $numstep $1 $2<br />
elif [ $# -eq 3 ]<br />
then<br />
let numstep=`expr &#8216;(&#8217; $3 - $1 + 1 &#8216;)&#8217; / $2 `<br />
let to=`expr $3 - &#8216;(&#8217; &#8216;(&#8217; $3 - $1 + 1 &#8216;)&#8217; % $numstep &#8216;)&#8217; `<br />
jot ${numstep} $1 $to<br />
else<br />
echo &#8220;USAGE: seq [num from] [[num step]] [num to]&#8221;<br />
exit 1;<br />
fi<br />
;;<br />
esac</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: scruss</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-98548</link>
		<dc:creator>scruss</dc:creator>
		<pubDate>Tue, 15 Apr 2008 23:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-98548</guid>
		<description>Playing with jot a bit (I'm on a train), I rather like it. What jot can do in one command

jot -w %02x 255 0

(printing hexadecimal numbers 00 .. ff) seq needs a composite command:

seq 0 255 &#124; xargs -n1 printf "%02x\n"

neat!</description>
		<content:encoded><![CDATA[<div class='microid-39e9203943c28eb09e49ddfabd32604466ddf22a'>Playing with jot a bit (I&#8217;m on a train), I rather like it. What jot can do in one command</p>
<p>jot -w %02x 255 0</p>
<p>(printing hexadecimal numbers 00 .. ff) seq needs a composite command:</p>
<p>seq 0 255 | xargs -n1 printf &#8220;%02x\n&#8221;</p>
<p>neat!</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: scruss</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-98547</link>
		<dc:creator>scruss</dc:creator>
		<pubDate>Tue, 15 Apr 2008 23:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-98547</guid>
		<description>Oh, and there's also always 'jot', seq's weird hippie cousin which is installed by default: http://www.nevdull.com/2007/09/24/gnu-seqs-cousin-on-freebsd-is-jot/

Nice try with that shell, Markus. It would work for maybe 80% of uses, but would fail for the rest.</description>
		<content:encoded><![CDATA[<div class='microid-39e9203943c28eb09e49ddfabd32604466ddf22a'>Oh, and there&#8217;s also always &#8216;jot&#8217;, seq&#8217;s weird hippie cousin which is installed by default: <a href="http://www.nevdull.com/2007/09/24/gnu-seqs-cousin-on-freebsd-is-jot/" >http://www.nevdull.com/2007/09/24/gnu-seqs-cousin-on-freebsd-is-jot/</a></p>
<p>Nice try with that shell, Markus. It would work for maybe 80% of uses, but would fail for the rest.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: scruss</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-98546</link>
		<dc:creator>scruss</dc:creator>
		<pubDate>Tue, 15 Apr 2008 23:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-98546</guid>
		<description>see the second comment, Robert. And /opt is a crime against nature!</description>
		<content:encoded><![CDATA[<div class='microid-39e9203943c28eb09e49ddfabd32604466ddf22a'>see the second comment, Robert. And /opt is a crime against nature!</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Borkowski</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-98511</link>
		<dc:creator>Robert Borkowski</dc:creator>
		<pubDate>Tue, 15 Apr 2008 13:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-98511</guid>
		<description>sudo ln -s /opt/local/bin/gseq /opt/local/bin/seq

:-)</description>
		<content:encoded><![CDATA[<div class='microid-3aaea571ca22949b1b840f2a720c6ba20d50129e'>sudo ln -s /opt/local/bin/gseq /opt/local/bin/seq</p>
<p> <img src='http://scruss.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </div>
]]></content:encoded>
	</item>
	<item>
		<title>By: markus</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-96442</link>
		<dc:creator>markus</dc:creator>
		<pubDate>Tue, 25 Mar 2008 23:04:13 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-96442</guid>
		<description>Hi, agreed, it bothers me too.... so much did i want this functionality without needing to do darwin ports ... and having seen your recent post on this topic, i've just knocked together a 2 min bash script to add this functionality without actually installing anything, 


i just made this script and called it /usr/bin/seq 
chmod +x /usr/bin/seq 
and i'm good to go.. 

... i also hope this posts ok....  i have a feeling it may get filtered by the forum... maybe you can figure it out again 

#!/bin/bash
# marks rude seq replacement for osx. 

if [ $# -eq 2 ] 
then
 let from="$1"; 
 let to="$2"; 
elif [ $# -eq 1 ] 
then 
 let from="0"; 
 let to="$1"; 
else 
        echo "USAGE: seq [num from] [num to]" 
        exit 1; 
fi

while [ $from -lt $to ] 
do 
        printf "$from "; 
        from=$[$from+1]
done 
        printf "$from ";</description>
		<content:encoded><![CDATA[<div class='microid-1c6bafd5d295840f7e8d7856c53374cbf4194a12'>Hi, agreed, it bothers me too&#8230;. so much did i want this functionality without needing to do darwin ports &#8230; and having seen your recent post on this topic, i&#8217;ve just knocked together a 2 min bash script to add this functionality without actually installing anything, </p>
<p>i just made this script and called it /usr/bin/seq<br />
chmod +x /usr/bin/seq<br />
and i&#8217;m good to go.. </p>
<p>&#8230; i also hope this posts ok&#8230;.  i have a feeling it may get filtered by the forum&#8230; maybe you can figure it out again </p>
<p>#!/bin/bash<br />
# marks rude seq replacement for osx. </p>
<p>if [ $# -eq 2 ]<br />
then<br />
 let from=&#8221;$1&#8243;;<br />
 let to=&#8221;$2&#8243;;<br />
elif [ $# -eq 1 ]<br />
then<br />
 let from=&#8221;0&#8243;;<br />
 let to=&#8221;$1&#8243;;<br />
else<br />
        echo &#8220;USAGE: seq [num from] [num to]&#8221;<br />
        exit 1;<br />
fi</p>
<p>while [ $from -lt $to ]<br />
do<br />
        printf &#8220;$from &#8220;;<br />
        from=$[$from+1]<br />
done<br />
        printf &#8220;$from &#8220;;</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: scruss</title>
		<link>http://scruss.com/blog/2008/02/08/seq-for-os-x/comment-page-1/#comment-91535</link>
		<dc:creator>scruss</dc:creator>
		<pubDate>Thu, 21 Feb 2008 20:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://scruss.com/blog/2008/02/08/seq-for-os-x/#comment-91535</guid>
		<description>Yeah, but it's called 'seq' in all the scripts I have, and it wouldn't be worth me having macports for just one command.</description>
		<content:encoded><![CDATA[<div class='microid-39e9203943c28eb09e49ddfabd32604466ddf22a'>Yeah, but it&#8217;s called &#8217;seq&#8217; in all the scripts I have, and it wouldn&#8217;t be worth me having macports for just one command.</div>
]]></content:encoded>
	</item>
</channel>
</rss>
