<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic shell script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039291#M5975</link>
    <description>Hi!&lt;BR /&gt;&lt;BR /&gt;How can you detect/check which drive (dev/hda or /dev/hdc) is up using a script?&lt;BR /&gt;&lt;BR /&gt;I'm making an offline disk mirroring script using dd command. Offline disk mirroring in the sense that the mirroring is a scheduled type of backup (not like the usual one which is a realtime mirroring - to avoid crashes when certain patch is applied and it can boot either of the drives at once).  &lt;BR /&gt;&lt;BR /&gt;Hope you can help me.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;LAT</description>
    <pubDate>Fri, 01 Aug 2003 10:20:32 GMT</pubDate>
    <dc:creator>Leovino A. Trinidad, Jr</dc:creator>
    <dc:date>2003-08-01T10:20:32Z</dc:date>
    <item>
      <title>shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039291#M5975</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;How can you detect/check which drive (dev/hda or /dev/hdc) is up using a script?&lt;BR /&gt;&lt;BR /&gt;I'm making an offline disk mirroring script using dd command. Offline disk mirroring in the sense that the mirroring is a scheduled type of backup (not like the usual one which is a realtime mirroring - to avoid crashes when certain patch is applied and it can boot either of the drives at once).  &lt;BR /&gt;&lt;BR /&gt;Hope you can help me.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;LAT</description>
      <pubDate>Fri, 01 Aug 2003 10:20:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039291#M5975</guid>
      <dc:creator>Leovino A. Trinidad, Jr</dc:creator>
      <dc:date>2003-08-01T10:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039292#M5976</link>
      <description>Hi LAT,&lt;BR /&gt;&lt;BR /&gt;For be up, do you mean mounted?&lt;BR /&gt;&lt;BR /&gt;If so, you can try this one:&lt;BR /&gt;&lt;BR /&gt;ACTIVEA=`df | grep /dev/hda | wc -l`&lt;BR /&gt;ACTIVEC=`df | grep /dev/hdc | wc -l`&lt;BR /&gt;&lt;BR /&gt;If ACTIVEA is 0 (zero) there is nothing mounted in /dev/hda, the same for ACTIVEC&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Frank</description>
      <pubDate>Fri, 01 Aug 2003 10:46:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039292#M5976</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2003-08-01T10:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039293#M5977</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;thanks for the help! Just want to make a correction on the declaration of the variable it should be&lt;BR /&gt;&lt;BR /&gt;ACTIVEA=$(df|grep /dev/hda|wc -l)&lt;BR /&gt;ACTIVEC=$(df|grep /dev/hdc|wc -l)&lt;BR /&gt;&lt;BR /&gt;instead of &lt;BR /&gt;&lt;BR /&gt;ACTIVEA='df|grep /dev/hda|wc -l' -- this will have a string result.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;LAT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Aug 2003 12:53:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039293#M5977</guid>
      <dc:creator>Leovino A. Trinidad, Jr</dc:creator>
      <dc:date>2003-08-01T12:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039294#M5978</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Lets say that this depend on the shell&lt;BR /&gt;that script is for (sh/bash/csh/ksh)&lt;BR /&gt;&lt;BR /&gt;And yes you can do this.&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Fri, 01 Aug 2003 16:05:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039294#M5978</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-08-01T16:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039295#M5979</link>
      <description>Hi LAT,&lt;BR /&gt;&lt;BR /&gt;If you don't want a sting value, your correction is right. Good correction.&lt;BR /&gt;&lt;BR /&gt;On the other hand FYI, you can obtain useful information about the system in the virtual /proc file system. For example, if you issue:&lt;BR /&gt;&lt;BR /&gt;cat /proc/modules, you get information about loaded kernel modules. Or&lt;BR /&gt;&lt;BR /&gt;cat /proc/meminfo, you get information about the used memory in the system. &lt;BR /&gt;&lt;BR /&gt;Or about the partitions you have "used" you can type: cat /proc/partitions and pipe the output through a grep like in df command.&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;Frank.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Aug 2003 16:07:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script/m-p/3039295#M5979</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2003-08-01T16:07:44Z</dc:date>
    </item>
  </channel>
</rss>

