<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>The UNIX and Linux Forums - OS X (Apple)</title>
		<link>http://www.unix.com/</link>
		<description>OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.</description>
		<language>en</language>
		<lastBuildDate>Sat, 21 Nov 2009 00:33:55 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>5</ttl>
		<image>
			<url>http://solaris.unix.com/images/misc/rss.jpg</url>
			<title>The UNIX and Linux Forums - OS X (Apple)</title>
			<link>http://www.unix.com/</link>
		</image>
		<item>
			<title>Terminal.app keeps creating copies of my settings files</title>
			<link>http://www.unix.com/os-x-apple/123632-terminal-app-keeps-creating-copies-my-settings-files-new-post.html</link>
			<pubDate>Thu, 12 Nov 2009 16:55:58 GMT</pubDate>
			<description><![CDATA[Under Leopard, I like to conveniently open Terminal windows onto remote systems. I've created several settings files in Terminal, one for each remote system that I want to access. To open window, I right-click on the Terminal icon in the Dock, expand the "New Window" menu item, and select the...]]></description>
			<content:encoded><![CDATA[<div>Under Leopard, I like to conveniently open Terminal windows onto remote systems. I've created several settings files in Terminal, one for each remote system that I want to access. To open window, I right-click on the Terminal icon in the Dock, expand the &quot;New Window&quot; menu item, and select the remote system I want to connect to. This has worked very well for me for years.<br />
<br />
Today I tried to improve the process. I created a shell script for each remote system. Each script contains a single line like<br />
<br />
open /Library/Application Support/Terminal/system-abc.terminal<br />
<br />
I created the system-abc.terminal files by doing Terminal-&gt;Shell-&gt;Export Settings... When I execute the shell script, a new Terminal window pops up as expected. This is great - now I can execute the shell script from Quicksilver, so I have a way to open Terminals with a few keystrokes.<br />
<br />
This works quite well, but it has an unfortunate side effect. Whenever I execute the shell script, a new menu item gets added to Terminal's list of remote systems. In other words, after executing the above script once and then right-click on the Terminal icon in the dock, and expand &quot;New Window&quot;, I find a brand-new thing in the list. The new thing is called &quot;system-abc 1&quot;. If I run the script again, I find another new thing named &quot;system-abc 2&quot;. Etc.<br />
<br />
So it works, but it clutters up the list of remote systems. Is this a bug in Terminal?</div>

]]></content:encoded>
			<category domain="http://www.unix.com/os-x-apple/">OS X (Apple)</category>
			<dc:creator>siemsen</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/os-x-apple/123632-terminal-app-keeps-creating-copies-my-settings-files.html</guid>
		</item>
		<item>
			<title>Keyword Searching</title>
			<link>http://www.unix.com/os-x-apple/123427-keyword-searching-new-post.html</link>
			<pubDate>Tue, 10 Nov 2009 18:44:41 GMT</pubDate>
			<description>Hi all, 
 
I am in the process of building a shell script as part of a auditing utility. It will search a specified directory for keywords and output results of the file path, and line number that the word was found on. I built a test script (shown below) that does just this, but egrep apparently...</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I am in the process of building a shell script as part of a auditing utility. It will search a specified directory for keywords and output results of the file path, and line number that the word was found on. I built a test script (shown below) that does just this, but egrep apparently does not allow MS word, excel, etc... documents to be read. I was wondering if someone could point me in an alternate direction that would allow me to search these types of documents as well? (Wordfile is a file that is create elsewhere with a list of words to search for e.g. bus)<br />
<br />
Thanks!<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">cat &lt;&lt; EOF &gt; ${TMPDIR}/scanit<br />
rm -f ${TMPDIR}/strings<br />
strings &quot;\$1&quot; | egrep -n -i -f ${TMPDIR}/wordlist ^\d{3}-\d{2}-\d{4}$ &gt;&gt; ${TMPDIR}/strings<br />
if [ -s ${TMPDIR}/strings ]<br />
then<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo &gt;&gt; ${TMPDIR}/${HOSTNAME}.o<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;File:&nbsp; \$1&quot; &gt;&gt; ${TMPDIR}/${HOSTNAME}.o<br />
&nbsp; &nbsp; &nbsp; &nbsp; file &quot;\$1&quot;&nbsp; &gt;&gt; ${TMPDIR}/${HOSTNAME}.o<br />
&nbsp; &nbsp; &nbsp; &nbsp; cat ${TMPDIR}/strings &gt;&gt; ${TMPDIR}/${HOSTNAME}.o<br />
fi<br />
rm -f ${TMPDIR}/strings<br />
EOF<br />
<br />
HOSTNAME=`hostname`<br />
export HOSTNHAME<br />
<br />
if [ $# -eq 0 ]<br />
then<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;You must specify the start of the directory tree to search&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; exit<br />
fi<br />
<br />
find $1 -type f 2&gt; ${TMPDIR}/${HOSTNAME}_find_errors | tee ${TMPDIR}/${HOSTNAME}_filelist | \<br />
head -100 |\<br />
<acronym title="Stream Editor">sed</acronym> -e &quot;s+^+sh -x ${TMPDIR}/scanit \&quot;+&quot; -e 's/$/&quot;/' &gt; ${TMPDIR}/scanitnow<br />
<br />
sh -x ${TMPDIR}/scanitnow 1&gt; ${TMPDIR}/${HOSTNAME}_scan_run 2&gt;&amp;1<br />
<br />
cd ${TMPDIR}<br />
if [ -s ${HOSTNAME}.o ]<br />
then<br />
&nbsp; &nbsp; &nbsp; &nbsp; date &quot;+%Y%M%d_%H:%m:%S: indicators found on ${HOSTNAME}&quot; &gt; ${HOSTNAME}_scan_results.csv<br />
&nbsp; &nbsp; &nbsp; &nbsp; cat ${HOSTNAME}.o &gt;&gt; ${HOSTNAME}_scan_results.csv<br />
else<br />
&nbsp; &nbsp; &nbsp; &nbsp; date &quot;+%Y%M%d_%H:%m:%S:&nbsp; No indicators found on ${HOSTNAME}&quot; &gt; ${HOSTNAME}_scan_results.csv<br />
fi<br />
<br />
zip ${HOSTNAME}_scan.zip ${HOSTNAME}_find_errors ${HOSTNAME}_filelist ${HOSTNAME}_scan_run ${HOSTNAME}_scan_results.csv</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.unix.com/os-x-apple/">OS X (Apple)</category>
			<dc:creator>tmcmurtr</dc:creator>
			<guid isPermaLink="true">http://www.unix.com/os-x-apple/123427-keyword-searching.html</guid>
		</item>
	</channel>
</rss>
