news command?
I don't know where this should go ... but how do I make a command that when a user types "news", they get displayed the server news. I'm thinking of having a text file that contains the news and having a command that just does "cat newsfile" or something of that sort... but how do I make the command "news" that does "cat newsfile" available for all users on the system?
|
How about creating a traditional text file for your news:
/etc/motd Then edit /etc/bashrc and at the end add a line: alias news='cat /etc/motd' You could also do it via less with: alias news='less /etc/motd' |
Or instead of adding them to the motd file, just create an alias that echos the news servers when simply typing 'news', etc.
|
I don't have the file /etc/bashrc. Where should alias' be put? I'm using Slackware 9.1 Thanks in advance.
|
Quote:
Cheers |
Thank you very much to both of you. :)
|
All times are GMT -5. The time now is 12:31 AM. |