It looks like you're new here. If you want to get involved, click one of these buttons!
I want to make a Bash Script where do I put it?
In what Directory?
a script to do what?
To see Users....
zcat /var/log/user.log.4.gz > /tmp/kiwi.log;
zcat /var/log/user.log.3.gz >> /tmp/kiwi.log;
zcat /var/log/user.log.2.gz >> /tmp/kiwi.log;
cat /var/log/user.log.1 >> /tmp/kiwi.log;
cat /var/log/user.log >> /tmp/kiwi.log;
#Show everything that has 'leaving' in the line grep -i leaving
#Don't Show anything that has 'kf6vo' in the line grep -vi kf6vo
#Don't Show anything that has '192.168.254.*' in the line grep -vi 192.168.254.*
#IE. My Local Intranet address's of my computers that I use to access my Kiwisdr
#Don't Show anything that has '127.0.0.1' in the line grep -vi 127.0.0.1
cat /tmp/kiwi.log | grep -i leaving | grep -vi kf6vo | grep -vi 192.168.254.* | grep -vi 127.0.0.1 >> /tmp/kiwi-users.log
#Delete User List:
#rm -f /tmp/kiwi.log
put in /usr/local/bin
To keep "own" things separate, I'm using a self-created directory /root/mystuff and put things like bash scripts etc there. But that's a matter of personal taste.
Yes, Thank you for help..... I like the 'a self-created directory /root/mystuff and put things like bash scripts etc there.' Better idea....