<?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 Re: Script with awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169283#M897101</link>
    <description>Another approach:&lt;BR /&gt;&lt;BR /&gt;Store the output of 'ls -l'. &lt;BR /&gt;Net time you run 'ls -l' again, and run a diff between the two listings.&lt;BR /&gt;This will only tell you 'something' has changed.&lt;BR /&gt;&lt;BR /&gt;If you want to keep history, use rcs to store all (different) versions.&lt;BR /&gt;&lt;BR /&gt;JP</description>
    <pubDate>Wed, 21 Jan 2004 08:34:49 GMT</pubDate>
    <dc:creator>Jeroen Peereboom</dc:creator>
    <dc:date>2004-01-21T08:34:49Z</dc:date>
    <item>
      <title>Script with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169280#M897098</link>
      <description>I have list file,I want to now if 1 file on a directory was change size or date time, I get the email for this case. If the file not modified the date time or size, email not come.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jan 2004 01:50:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169280#M897098</guid>
      <dc:creator>Rommy Setiadi_1</dc:creator>
      <dc:date>2004-01-21T01:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169281#M897099</link>
      <description>For this, you need to keep record of the last time the check command ran.&lt;BR /&gt;&lt;BR /&gt;This doesn't seem like an awk script. Just from shell is good enough, I think:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;if [ $# -ne 1 ]&lt;BR /&gt;then&lt;BR /&gt;   echo "Usage: $0 &lt;FILE&gt;"&lt;BR /&gt;   exit 1&lt;BR /&gt;fi&lt;BR /&gt;BASE=`basename "$1"`&lt;BR /&gt;STAMPFILE="/var/adm/stamps/${BASE}.stamp"&lt;BR /&gt;&lt;BR /&gt;if [ -f $"{STAMPFILE}" ]&lt;BR /&gt;then&lt;BR /&gt;   mv "${STAMPFILE}" "${STAMPFILE}.prev"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;ls -l "$1" &amp;gt;"${STAMPFILE}"&lt;BR /&gt;&lt;BR /&gt;if [ -f "${STAMPFILE}.prev" ]&lt;BR /&gt;then&lt;BR /&gt;   if cmp -s "${STAMPFILE}" "${STAMPFILE}.prev"&lt;BR /&gt;   then&lt;BR /&gt;      echo "Files are the same"&lt;BR /&gt;   else&lt;BR /&gt;      echo "File changed."&lt;BR /&gt;      echo "Was:"&lt;BR /&gt;      cat "${STAMPFILE}.prev"&lt;BR /&gt;      echo "Is now:"&lt;BR /&gt;      cat "${STAMPFILE}"&lt;BR /&gt;   fi&lt;BR /&gt;else&lt;BR /&gt;   echo "First run. Nothing to compare yet."&lt;BR /&gt;fi&lt;/FILE&gt;</description>
      <pubDate>Wed, 21 Jan 2004 02:03:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169281#M897099</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-01-21T02:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169282#M897100</link>
      <description>Why using awk to find changed files, you can use find to find changed files within the last 24hours.&lt;BR /&gt;&lt;BR /&gt;find /path/directory -mtime 1 &amp;gt;/tmp/tmp.lst&lt;BR /&gt;if [ `cat /tmp/tmp.lst | wc -l` -gt 0 ]&lt;BR /&gt;then&lt;BR /&gt;cat /tmp/tmp.lst | mailx -s "files found" account@domain.com&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jan 2004 02:21:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169282#M897100</guid>
      <dc:creator>Hoefnix</dc:creator>
      <dc:date>2004-01-21T02:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script with awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169283#M897101</link>
      <description>Another approach:&lt;BR /&gt;&lt;BR /&gt;Store the output of 'ls -l'. &lt;BR /&gt;Net time you run 'ls -l' again, and run a diff between the two listings.&lt;BR /&gt;This will only tell you 'something' has changed.&lt;BR /&gt;&lt;BR /&gt;If you want to keep history, use rcs to store all (different) versions.&lt;BR /&gt;&lt;BR /&gt;JP</description>
      <pubDate>Wed, 21 Jan 2004 08:34:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-with-awk/m-p/3169283#M897101</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-01-21T08:34:49Z</dc:date>
    </item>
  </channel>
</rss>

