<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; отправка информации из консоли в файл txt]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=30238&amp;type=atom" />
	<updated>2013-09-12T03:26:04Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=30238</id>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362825#p362825" />
			<content type="html"><![CDATA[<p>Хм, действительно, хотя вывод команд через точку с запятой объединяется, перенаправление вывода относится к последней... А ведь изначально со скобками написал ... :-)</p>]]></content>
			<author>
				<name><![CDATA[bormant]]></name>
				<uri>https://linuxforum.ru/profile.php?id=732</uri>
			</author>
			<updated>2013-09-12T03:26:04Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362825#p362825</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362802#p362802" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>(whoami; arch; pwd; netstat -tupln; df -h) &gt; file.txt 2&gt;&amp;1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-09-11T18:06:50Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362802#p362802</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362801#p362801" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>bormant⇓ пишет:</cite><blockquote><p>А можно одностроком :-)</p></blockquote></div><div class="codebox"><pre><code>lupo@sabayon-netbook ~ $ whoami; arch; pwd; netstat -tupln; df -h &gt; file.txt 2&gt;&amp;1
lupo
x86_64
/home/lupo
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:19390           0.0.0.0:*               LISTEN      8973/skype          
tcp        0      0 0.0.0.0:8010            0.0.0.0:*               LISTEN      7542/psi            
tcp6       0      0 :::631                  :::*                    LISTEN      -                   
udp        0      0 0.0.0.0:38457           0.0.0.0:*                           7542/psi            
udp        0      0 0.0.0.0:631             0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:19390           0.0.0.0:*                           8973/skype          
udp        0      0 127.0.0.1:49214         0.0.0.0:*                           8973/skype          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:53639           0.0.0.0:*                           -                   
udp6       0      0 :::59005                :::*                                7542/psi            
udp6       0      0 :::5353                 :::*                                -                   
udp6       0      0 :::53508                :::*                                -                   
lupo@sabayon-netbook ~ $ cat file.txt 
Файловая система                     Размер Использовано  Дост Использовано% Cмонтировано в
/dev/mapper/vg_sabayonnetboo-lv_root    50G         9,8G   37G           22% /
none                                   879M         1,1M  878M            1% /run
none                                   879M         260K  878M            1% /dev/shm
udev                                    10M            0   10M            0% /dev
tmpfs                                  879M         260K  878M            1% /dev/shm
tmpfs                                  879M            0  879M            0% /sys/fs/cgroup
tmpfs                                  100M          16K  100M            1% /tmp
/dev/mapper/vg_sabayonnetboo-lv_home   240G         6,7G  221G            3% /home
/dev/sda1                              477M          47M  401M           11% /boot
lupo@sabayon-netbook ~ $ </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-09-11T18:05:25Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362801#p362801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362800#p362800" />
			<content type="html"><![CDATA[<p>А можно одностроком :-) </p><div class="codebox"><pre><code>$ whoami; arch; pwd; netstat -tupln; df -h &gt; file.txt 2&gt;&amp;1</code></pre></div><p>или (на мой взгляд идея перенаправлять вникуда вывод ошибках при сборе информации не очень полезна)</p><div class="codebox"><pre><code>#!/bin/bash
FILE=&quot;test.txt&quot;
for i in &quot;whoami&quot; &quot;arch&quot; &quot;pwd&quot; &quot;netstat -tupln&quot; &quot;df -h&quot;; do
        echo &quot;Just run next command - ${i}&quot;
        sleep 1
        echo -e &quot;*****************************************\n&quot;
        ${i}
        echo -e &quot;\n*****************************************&quot;
done &gt;&gt; ${FILE} 2&gt;&amp;1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[bormant]]></name>
				<uri>https://linuxforum.ru/profile.php?id=732</uri>
			</author>
			<updated>2013-09-11T17:59:11Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362800#p362800</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362793#p362793" />
			<content type="html"><![CDATA[<p><strong>Lupo Alberto</strong>, спасибо огромное <img src="https://linuxforum.ru/img/smilies/ay.gif" alt="ay" /></p>]]></content>
			<author>
				<name><![CDATA[vladimir-rmank]]></name>
				<uri>https://linuxforum.ru/profile.php?id=31651</uri>
			</author>
			<updated>2013-09-11T16:42:36Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362793#p362793</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362790#p362790" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>-=Serj=- пишет:</cite><blockquote><p><strong>Lupo Alberto</strong>, прямо таки произведение искусства!&nbsp; <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /></p></blockquote></div><p> <img src="https://linuxforum.ru/img/smilies/ah.gif" alt="ah" /></p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-09-11T15:36:29Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362790#p362790</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362788#p362788" />
			<content type="html"><![CDATA[<p><strong>Lupo Alberto</strong>, прямо таки произведение искусства!&nbsp; <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /></p>]]></content>
			<author>
				<name><![CDATA[-=Serj=-]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16175</uri>
			</author>
			<updated>2013-09-11T15:30:30Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362788#p362788</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362786#p362786" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#!/bin/bash
FILE=&quot;test.txt&quot;
for i in &quot;whoami&quot; &quot;arch&quot; &quot;pwd&quot; &quot;netstat -tupln&quot; &quot;df -h&quot;;
do
        echo &quot;Just run next command - ${i}&quot;
        sleep 1
        echo &quot;*****************************************&quot;
        echo &quot;&quot;
        ${i}
        echo &quot;&quot;
        echo &quot;*****************************************&quot;
done &gt;&gt; ${FILE} 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>2013-09-11T15:19:03Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362786#p362786</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362778#p362778" />
			<content type="html"><![CDATA[<p><a href="http://rus-linux%20net/book1.php?name=book1/gl-05/gl_05_05.html">http://rus-linux net/book1.php?name=boo … 05_05.html</a></p>]]></content>
			<author>
				<name><![CDATA[-=Serj=-]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16175</uri>
			</author>
			<updated>2013-09-11T13:43:21Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362778#p362778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[отправка информации из консоли в файл txt]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=362777#p362777" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#! /bin/bash
whoami
arch
pwd
netstat -tupln
df -h</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vladimir-rmank]]></name>
				<uri>https://linuxforum.ru/profile.php?id=31651</uri>
			</author>
			<updated>2013-09-11T13:32:57Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=362777#p362777</id>
		</entry>
</feed>
