[Geany-Users] Open file at end - 50 lines

Andrew Kennedy andrew_kennedy7 at xxxxx
Sun Aug 16 01:12:20 UTC 2020


 Thanks.

Andy

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


     On Saturday, August 15, 2020, 07:53:11 PM CDT, Matthew Brush <mbrush at codebrainz.ca> wrote:  
 
 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 
>> <mbrush at 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 at lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>
> 
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users at lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/users
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/users/attachments/20200816/b5f41871/attachment.htm>


More information about the Users mailing list