<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Musings &#187; ksh93</title>
	<atom:link href="http://blog.fpmurphy.com/tag/ksh93/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.fpmurphy.com</link>
	<description>of an OS plumber</description>
	<lastBuildDate>Wed, 11 Jan 2012 19:14:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Shell Script: Print Hexadecimal Representation of String</title>
		<link>http://blog.fpmurphy.com/2010/12/shell-script-print-hexadecimal-representation-of-string.html</link>
		<comments>http://blog.fpmurphy.com/2010/12/shell-script-print-hexadecimal-representation-of-string.html#comments</comments>
		<pubDate>Sun, 12 Dec 2010 03:39:44 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[ksh93]]></category>
		<category><![CDATA[POSIX]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[codeset]]></category>
		<category><![CDATA[printf]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=396</guid>
		<description><![CDATA[This post discusses how to print out the numeric value of a character in the underlying codeset in a shell script.  ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2010/12/shell-script-print-hexadecimal-representation-of-string.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting Korn Shell 93 to Windows 7 SUA</title>
		<link>http://blog.fpmurphy.com/2010/10/porting-ksh93-to-windows-7-sua.html</link>
		<comments>http://blog.fpmurphy.com/2010/10/porting-ksh93-to-windows-7-sua.html#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:39:04 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[ksh93]]></category>
		<category><![CDATA[POSIX]]></category>
		<category><![CDATA[SUA]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=377</guid>
		<description><![CDATA[This post shows you how to download, build and install the latest version of the Korn shell in the Windows 7 SUA subsystem. ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2010/10/porting-ksh93-to-windows-7-sua.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Korn Shell 93 Hash Builtins</title>
		<link>http://blog.fpmurphy.com/2010/08/ksh93-hash-builtins.html</link>
		<comments>http://blog.fpmurphy.com/2010/08/ksh93-hash-builtins.html#comments</comments>
		<pubDate>Sat, 07 Aug 2010 18:41:59 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[ksh93]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=361</guid>
		<description><![CDATA[This post shows you how to incorporate hash functions built into the AT&#038;T Advanced Software Technologies (AST) libsum library in your Korn shell shell scripts via custom builtins in a dynamically loadable plugin.  ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2010/08/ksh93-hash-builtins.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Localizing Korn Shell Scripts</title>
		<link>http://blog.fpmurphy.com/2010/07/localizing-korn-shell-scripts.html</link>
		<comments>http://blog.fpmurphy.com/2010/07/localizing-korn-shell-scripts.html#comments</comments>
		<pubDate>Sat, 17 Jul 2010 14:57:02 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[ksh93]]></category>
		<category><![CDATA[POSIX]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[message catalog]]></category>
		<category><![CDATA[shell scripts]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=351</guid>
		<description><![CDATA[In this post I discuss how to internationalize and localize message text strings in Korn Shell scripts and briefly touch on some other localization issues such as numbers, dates and piping which may affect your shell scripts. ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2010/07/localizing-korn-shell-scripts.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Types To Create Object Orientated Korn Shell 93 Scripts</title>
		<link>http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html</link>
		<comments>http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html#comments</comments>
		<pubDate>Fri, 21 May 2010 03:23:09 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[ksh93]]></category>
		<category><![CDATA[OO]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[types]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=330</guid>
		<description><![CDATA[This post discusses the concept of types which are a recent addition to ksh93 and, by means of a number of examples, demonstrates how to use types to implement an object-orientated approach to writing ksh93 shell scripts. ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sort Korn Shell 93 Associative Arrays</title>
		<link>http://blog.fpmurphy.com/2010/05/ksh93-sort-associative-arrays.html</link>
		<comments>http://blog.fpmurphy.com/2010/05/ksh93-sort-associative-arrays.html#comments</comments>
		<pubDate>Mon, 17 May 2010 15:53:36 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[ksh93]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=328</guid>
		<description><![CDATA[This port demonstrates one method of sort printing the elements of an Korn shell associative array. ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2010/05/ksh93-sort-associative-arrays.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Korn Shell 93 libshell</title>
		<link>http://blog.fpmurphy.com/2009/11/ksh93-libshell.html</link>
		<comments>http://blog.fpmurphy.com/2009/11/ksh93-libshell.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 18:29:05 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[ksh93]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/?p=296</guid>
		<description><![CDATA[In a number of posts about a year ago I discussed how to develop custom builtins for Korn Shell 93 (ksh93) using libshell and published APIs. You can also use these same APIs to access ksh93 functionality from within a C application. This post provides three simple examples of how to do this.  ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2009/11/ksh93-libshell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Korn Shell 93 Message Localization</title>
		<link>http://blog.fpmurphy.com/2009/05/ksh93-message-localization.html</link>
		<comments>http://blog.fpmurphy.com/2009/05/ksh93-message-localization.html#comments</comments>
		<pubDate>Sat, 23 May 2009 19:56:00 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[ksh93]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[L10N]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/2009/05/ksh93-message-localization.html</guid>
		<description><![CDATA[ksh93 supports localization of internal error messages and getopts messages but localization of user messages in shell scripts is flawed. This post examines the issue and shows you how to easily support shell script message catalogs. ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2009/05/ksh93-message-localization.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bootable DVD/CDROM</title>
		<link>http://blog.fpmurphy.com/2009/03/bootable-dvdcdrom.html</link>
		<comments>http://blog.fpmurphy.com/2009/03/bootable-dvdcdrom.html#comments</comments>
		<pubDate>Sun, 15 Mar 2009 01:00:00 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ksh93]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/2009/03/bootable-dvdcdrom.html</guid>
		<description><![CDATA[<p>Have you ever wanted to determine whether a DVD or CDROM is a bootable CDROM or DVD from within a shell script?&#160; If you use GNU/Linux you could parse the output from the isoinfo utility which is part of the CDRecord tools suite.</p> <p>What if the isoinfo utility is not available on your operating system?&#160; In this case you have to resort to rolling you own compiled langauge utility or shell script.&#160; To do this you need to understand where to find the specific bytes on a CDROM/DVD which indicate whether it is a bootable CDROM/DVD or not.&#160; The relevant specification covering bootable CDROMs (and by extension bootable DVDs) is the El Torito specification which is an extension to the ISO 9660 specification. </p> <p>Our first shell script uses the dd utility to read in the required bytes which are then sliced and diced using the xxd and cut utilities..&#160; Sector 17 (hexadecimal 11, the Boot Record Volume) contains two bytes at a specific offset which are an absolute pointer to the Booting Catalog which in turn contains a specific byte which indicates whether a CDROM/DVD is bootable or not. #!/bin/bash # # use dd to read in the required bytes # DEVICE="/dev/sr0" VERBOSE=1 # get 2 bytes at absolute offset 34887 bchex=`dd if=${DEVICE} skip=$(( 0x800 * 0x11 + 0x47)) bs=1 count=2 conv=swab 2>/dev/null &#124; xxd &#124; cut -d" " -f2` # get one byte bcdec=`printf "%d" 0x${bchex}` bootable=`dd if=${DEVICE} bs=1 skip=$(( 0x800 * bcdec + 0x20)) count=1 2>/dev/null &#124; xxd &#124; cut -d" " -f2` if [[ $bootable = 88 ]]; then [ $VERBOSE ] &#038;&#038; printf "Bootable CDROM\n" exit 0 else [ $VERBOSE ] &#038;&#038; printf "Not a bootable CDROM\n" exit 1 fi <p>The previous shell script is classical in its approach to the problem in that it uses a number of small specialized utilities to achieve the desired result.</p> <p>Another way of achieving the same result is to use the extended I/O features of ksh93 as shown in the following shell script. #!/bin/ksh93 # # Cannot open DVD/CDROM for read/write - hence cannot seek # forward on file descriptor. Workaround is to close and # reopen the file descriptor. # DEVICE="/dev/sr0" VERBOSE=1 # read 2 bytes redirect 3< $DEVICE &#124;&#124; exit 3 ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2009/03/bootable-dvdcdrom.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Korn Shell 93 Bit Manipulation</title>
		<link>http://blog.fpmurphy.com/2009/02/khs93-bit-manipulation.html</link>
		<comments>http://blog.fpmurphy.com/2009/02/khs93-bit-manipulation.html#comments</comments>
		<pubDate>Sat, 21 Feb 2009 00:54:00 +0000</pubDate>
		<dc:creator>fpmurphy</dc:creator>
				<category><![CDATA[ksh93]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Korn Shell]]></category>
		<category><![CDATA[ksh]]></category>

		<guid isPermaLink="false">http://blog.fpmurphy.com/2009/02/ksh93-bit-manipulation.html</guid>
		<description><![CDATA[When programmers think about bitwise manipulation, they usually think about using C or C++ to solve their problem since both programming languages provide a rich set of features which make it easy to perform bitwise manipulation. It is possible to just as easily perform such operations using the Korn shell. This post explains what bitwise manipulation and number conversion facilities are available in ksh93. ]]></description>
		<wfw:commentRss>http://blog.fpmurphy.com/2009/02/khs93-bit-manipulation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

