On 2020-08-15 5:47 p.m., Matthew Brush wrote:
On 2020-08-15 5:44 p.m., Andrew Kennedy via Users wrote:
  Thanks.

This is MUCH shorter.

tail -n 50 /var/log/syslog > end_syslog.txt
geany end_syslog.txt


Indeed, I just offered a good general purpose wrapper script that does proper cleanup and saves a bit of typing.


To be clear, with the setup as I described, you just run:

geany-tail -n50 /var/log/syslog

Rather than:

tail -n 50 /var/log/syslog > end_syslog.txt
geany end_syslog.txt

And it will cleanup the intermediate file automatically.

All but line 39 in my pastebin only has to be done once to make the 'geany-tail' command available.

Regards,
Matthew Brush

Regards,
Matthew Brush

Sent via personal computer
"It is always too soon to quit."


      On Saturday, August 15, 2020, 07:19:42 PM CDT, Matthew Brush <mbr...@codebrainz.ca> wrote:
  On 2020-08-15 3:33 p.m., Andrew Kennedy via Users wrote:
I know this will display at line 900.

However the syslog file is variable in length.

geany -l 900 syslog.txt

Can I have geany display just the last 50 lines?

Thanks.


I'm not sure it can be done directly using Geany, but if you are on a
POSIX-ey OS with a BASH-like shell you can do something as described in
this pastebin:

https://geany.org/p/q1SUz/

I tested it on Ubuntu 20.04 and it works OK.

Regards,
Matthew Brush
_______________________________________________
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users

Reply via email to