<div id="geary-body" dir="auto"><div>Maiko,</div><div>OH of course! I made the assumption there would be a matching time in the log. Which now I think about it, that depends when the script is ran. doh!</div><div>I'll tail the logfile instead of trying to match times.</div><div><br></div><div>Thanks for the help.</div><div><br></div><div>Andrew - K1YMI</div><div><br></div></div><div id="geary-quote" dir="auto"><br>On Mon, Mar 10 2025 at 09:12:40 PM -05:00:00, maiko@pcsinternet.ca wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: break-spaces;">Hi Andrew,

It's your awk statement. IF the start does not find a direct matching
time entry, then nothing is generated, period. If I run the awk manually
at the command line and make sure to specify a starttime in the logfile,
then it dumps the full email. For example :

 Here is the tail end of a logfile on my backup system :

  19:47:22  CONSOLE - ax25 h all +h > archive.heard.txt
  19:53:40  - socket 137 has vanished
  19:55:11  - AT command: source bcteensy.nos+|2290+
   [snip]
  20:44:49  - socket 137 has vanished
  20:45:15  - AT command: ax25 h save+|2308+
  20:50:20  - socket 137 has vanished
  20:53:51  - socket 137 has vanished
  20:55:15  - AT command: source bcteensy.nos+|2304+
  20:55:15  - AT command: source report.nos+|2309+
  20:55:16  - AT command: ax25 h save+|2310+
  20:55:20  - AT command: source bcninotnc.nos+|2307+

 I run the awk portion of your script at the command line, direct to stdout,
 omitting the output file, just for testing :

    bash-5.1# awk -v start="19:51" -v end="20:58" '$0 ~ start, $0 ~ end' \
      /life/ve4klm/jnos/rte/logs/10Mar25

      NOTHING

    If I use start="19:47" instead, then BINGO, we get output :

      19:47:22  CONSOLE - ax25 h all +h > archive.heard.txt
      19:53:40  - socket 137 has vanished
      19:55:11  - AT command: source bcteensy.nos+|2290+
      19:55:11  - AT command: source report.nos+|2295+
        [snip]

  Also, I had to add +X permission to your sh file and on my
   jnos I have to run it as sh ./last10mins.sh, since '.' is
     not in the path, no big deal.

 Maiko

<blockquote><blockquote><blockquote>I am trying to fire off a shell script on a log trigger event, but
the script does not seem to execute.
I believe permissions are correct and it's executable. It also
runs fine when ran manually from command line under the same user
as JNOS.
Even if I try and run a 'shell ./shell_script.sh from the JNOS
admin console it does not seem to execute.
Is there a specific directory shell scripts should be in?

Andrew - K1YMI
</blockquote></blockquote>_______________________________________________
nos-bbs mailing list
<a href="mailto:nos-bbs@lists.tapr.org">nos-bbs@lists.tapr.org</a>
<a href="http://lists.tapr.org/mailman/listinfo/nos-bbs_lists.tapr.org">http://lists.tapr.org/mailman/listinfo/nos-bbs_lists.tapr.org</a>
</blockquote></div></blockquote></div>