puflogh300X74.gif

Polarwave's OpenBSD
Tips and Tricks for Newbies

| Get Help |

| Home | Tips and Tricks | Links | News Feeds | Fun | Contact | Blog (Opens in New Page) |


Getting Help

Sometimes you read the man page, extra documentation that comes with a
package or port you installed, search all over the internet with your favorite
search engine, search through relevant mailing lists, and you just can't come
up with an answer. What do you do? Well, one choice is to ask your question
on a list like OpenBSD misc. But before you do, read OpenBSD Mailing Lists
guidelines thoroughly. Pay particular attention to the second paragraph under
Netiquette: DO YOUR HOMEWORK BEFORE YOU POST! If you don't, it's
quite possible you'll get an answer like RTFM! Nice acronym. It simply means
Read The Fine Manual or, something close to that, if you get my drift. :-)
I don't want to repeat everything else it says there, so I'll just add some things
I think, speaking from my own experiences, that may and probably will come up
in the ensuing dialogue, should you get an answer.

Okay, enough preaching and oratory. :-) Below is an example of a scripted session.
I tried to keep it simple, just doing a search in /usr/local/bin for files ending with
an .sh extension like so:
$ cd /usr/local/bin/
$ script ~/example.out
Script started, ouput file is /home/myusername/example.out
$ find *.sh -print

No point in showing the output twice since it's shown in the file example.out
after the script finishes.

$ Ctrl-d (hold down the Ctrl key and tap the d key)
Script done, output file is /home/myusername/example.out

$ cd
$ cat example.out

And here's the content of the scripted session:

Script started on Tue Jan 1 23:09:31 2008
^M
mybox.myisp.net^M
23:09:31 Tue Jan 01^M
myusername /usr/local/bin
$ find .^H ^H*.sh -print^M^M
Etcolors.sh^M
Etmenu.sh^M
amuFormat.sh^M
anytovcd.sh^M
belkinstatus.sh^M
etcdbchgd.sh^M
fclamroll.sh^M
fig2ps2tex.sh^M
gettext.sh^M
lav2avi.sh^M
lprsetup.sh^M
notifyme.sh^M
pkgchgs.sh^M
pv.sh^M
rollbelkin.sh^M
unix-lpr.sh^M
^M
mybox.myisp.net^M
23:09:44 Tue Jan 01^M
myusername /usr/local/bin^M
$ ^D^M^M
Script done on Tue Jan 1 23:09:49 2008

To remove the ^M and ^H characters, open the file in vim or vi and use this command:

:%s/^M//g

The "^M" in the above line has to be typed in by pressing CTRL+v and then CTRL+M.
Repeat the procedure to remove the ^H characters:

:%s/^H//g
As it says in the OpenBSD mailing list page, better to include too much information
along with your question than not enough, and that usually includes the output of
dmesg. You can save it to a file like so:
$ dmesg > dmesg.out
I use mutt for my email and vim for my editor. While I'm composing in mutt, to get
my dmesg, I can do this:
:r! dmesg
However you choose to do it, it's definitely a good idea to send it along. So, as always,
read all you can and try your best before asking for help. But, don't be afraid to ask
for help. It's saved me many times. The folks on the mailing lists want to help, they
just don't want to do your homework for you.

Back to Tips and Tricks
Home

Delicious Bookmark this on Delicious

No affiliation between this site and the OpenBSD project exists or is implied.

valid-html401.png