<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Функция проверяющая наличие расширения .exe в определенной директории]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=34431&amp;type=atom" />
	<updated>2014-04-02T14:05:37Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=34431</id>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403455#p403455" />
			<content type="html"><![CDATA[<p>-iname</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://linuxforum.ru/profile.php?id=32462</uri>
			</author>
			<updated>2014-04-02T14:05:37Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403455#p403455</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403418#p403418" />
			<content type="html"><![CDATA[<p>Спасибо!!</p>]]></content>
			<author>
				<name><![CDATA[siberio2000]]></name>
				<uri>https://linuxforum.ru/profile.php?id=33777</uri>
			</author>
			<updated>2014-04-02T09:47:13Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403418#p403418</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403411#p403411" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>find . -name *.exe -exec echo &quot;Найдены файлы &#039;{}&#039;&quot; \; 2&gt;/dev/null</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2014-04-02T09:24:23Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403411#p403411</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403410#p403410" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>ls *.exe &gt; /dev/null 2&gt;&amp;1 &amp;&amp; echo &quot;Есть такая буква&quot; || echo &quot;Ничего не нашёл&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2014-04-02T09:22:02Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403410#p403410</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403403#p403403" />
			<content type="html"><![CDATA[<p>1. Заключите в кавычки &quot;echo foo&quot;.<br />2. Добавьте в конец строки &quot;\;&quot;.<br />3. man find до полного просветления...</p>]]></content>
			<author>
				<name><![CDATA[yars]]></name>
				<uri>https://linuxforum.ru/profile.php?id=22799</uri>
			</author>
			<updated>2014-04-02T08:29:21Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403403#p403403</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403401#p403401" />
			<content type="html"><![CDATA[<p>Пишет missing argument to -exec <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /></p>]]></content>
			<author>
				<name><![CDATA[siberio2000]]></name>
				<uri>https://linuxforum.ru/profile.php?id=33777</uri>
			</author>
			<updated>2014-04-02T08:24:15Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403401#p403401</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403384#p403384" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>find . -name *.exe -exec echo foo

#!/bin/bash
if [ -f *.exe ]; then
    echo foo
fi</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yars]]></name>
				<uri>https://linuxforum.ru/profile.php?id=22799</uri>
			</author>
			<updated>2014-04-02T04:27:02Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403384#p403384</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Функция проверяющая наличие расширения .exe в определенной директории]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=403369#p403369" />
			<content type="html"><![CDATA[<p>Здравствуйте! Мне необходима функция проверяющая наличие расширения .exe в определенной директории. Я пробовал некоторые функции с интернета, но они почему-то не работали:</p><div class="codebox"><pre><code>ls exe.* &gt;upload/my_files 2&amp;&gt;1
if [ $? -eq 0 ] ;  then
  echo &quot; ok&quot;
else
  echo &quot; no files found with foo.&quot;
fi</code></pre></div><p>или</p><div class="codebox"><pre><code>count=`ls -1 *.exe 2&gt;/upload/my_files | wc -l`
if [ $count != 0 ]
then 
echo true
fi </code></pre></div><p>Подскажите, пожалуйста, что не так. А лучше дайте альтернативу, желательно попроще <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /></p>]]></content>
			<author>
				<name><![CDATA[siberio2000]]></name>
				<uri>https://linuxforum.ru/profile.php?id=33777</uri>
			</author>
			<updated>2014-04-01T22:26:26Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=403369#p403369</id>
		</entry>
</feed>
