Self Hosting 101
Working with Files and Directories
There is no preview available for this lesson. Please join the course to access it. Click here to enroll.
Questions
Correction needed: On login show fortune message by cowsay
Raunak R
7 months ago
Post
Dismiss

Add the following at the end of bashrc:


# Cowsay fortune message when one logs in

if [ -x /usr/games/cowsay -a -x /usr/games/fortune ]; then

fortune | cowsay

fi

Add the following at the end of bashrc:


# Cowsay fortune message when one logs in

if [ -x /usr/games/cowsay -a -x /usr/games/fortune ]; then

fortune | cowsay

fi

sairam subramaniam
2 months ago
Post
Dismiss

Thank you Raunak

Thank you Raunak

Want to discuss?
Post it here, our mentors will help you out.
Correction in content to add in bashrc?
Vent_Srikar
8 months ago
Post
Dismiss
Hey i think there is some correction that must be done regarding on what and how to update the bashrc file so we can get random fortune strings
Hey i think there is some correction that must be done regarding on what and how to update the bashrc file so we can get random fortune strings
S Soumendra
7 months ago
Post
Dismiss

+1

+1

Want to discuss?
Post it here, our mentors will help you out.
You name fortune program but seem to run cowsay
Martin Fulgueiras
2 years ago
Post
Dismiss
Hi, tried the exercise in the .bashrc, but the system returns an error of the sort: -bash: /home/martin_fulgueiras/.bashrc: line 121: unexpected EOF while looking for matching `'' -bash: /home/martin_fulgueiras/.bashrc: line 131: syntax error: unexpected end of file I think we should run Fortune and not cowsay, or pasting was is asked to paste, but just a hunch. Thanks
Hi, tried the exercise in the .bashrc, but the system returns an error of the sort: -bash: /home/martin_fulgueiras/.bashrc: line 121: unexpected EOF while looking for matching `'' -bash: /home/martin_fulgueiras/.bashrc: line 131: syntax error: unexpected end of file I think we should run Fortune and not cowsay, or pasting was is asked to paste, but just a hunch. Thanks
Want to discuss?
Post it here, our mentors will help you out.
Issue with 'cat ~/.bashrc' command
Vishal Arya
2 years ago
Post
Dismiss
Not able to replicate changes after hitting 'cat ~/.bashrc'. After logging in again, found the below issue:
Last login: Sun Apr 10 18:05:00 2022 from 202.179.91.106 $: command not found
-bash: /home/wisharya/.bashrc: line 120: unexpected EOF while looking for matching `''
-bash: /home/wisharya/.bashrc: line 129: syntax error: unexpected end of file
Not able to replicate changes after hitting 'cat ~/.bashrc'. After logging in again, found the below issue:
Last login: Sun Apr 10 18:05:00 2022 from 202.179.91.106 $: command not found
-bash: /home/wisharya/.bashrc: line 120: unexpected EOF while looking for matching `''
-bash: /home/wisharya/.bashrc: line 129: syntax error: unexpected end of file
Want to discuss?
Post it here, our mentors will help you out.