What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Linux "uniq" command required

gscott187

New Around Here
I'm currently writing a shell script to extract IP addresses from "syslog.log" on the RT-N66U that requires the "uniq" executable. When I run "ipkg list" whilst logged in via SSH, "uniq" shows as not being installed.

Corrrect me if I'm wrong here, should running "ipkg install textutils" put the "uniq" executable on the device? My firmware version is the stable Merlin 3.0.0.4.270.26b build.

Any help in getting "uniq" onto the device would be appreciated.
 
I'm currently writing a shell script to extract IP addresses from "syslog.log" on the RT-N66U that requires the "uniq" executable. When I run "ipkg list" whilst logged in via SSH, "uniq" shows as not being installed.

Corrrect me if I'm wrong here, should running "ipkg install textutils" put the "uniq" executable on the device? My firmware version is the stable Merlin 3.0.0.4.270.26b build.

Any help in getting "uniq" onto the device would be appreciated.

Assuming you have Optware (or Entware) configured and working, this should do the trick.
 
Assuming you have Optware (or Entware) configured and working, this should do the trick.
Hi,

I checked Optware:
Code:
coreutils-uniq - 8.16-1 - Full version of standard GNU uniq utility. Normally, you would not use this package, since the functionality in BusyBox is more than sufficient.
If you really need it: Go for Optware! :rolleyes:

With kind regards
Joe :cool:
 
Thanks, I'm using "uniq -c" within a shell script to count the number of instances of blocked IP addresses in "syslog.log".

I'm porting a bash shell script I wrote about 18 months ago on another system that dealt with persistent offenders.

Interestingly, the most blocked IP address so far comes from a well known UK ISP trying to connect to their original router which has been replaced by an RT-N66U. :-)
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top