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.
$ cd /usr/local/bin/As it says in the OpenBSD mailing list page, better to include too much information
$ 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
$ dmesg > dmesg.outI use mutt for my email and vim for my editor. While I'm composing in mutt, to get
:r! dmesgHowever you choose to do it, it's definitely a good idea to send it along. So, as always,
No affiliation between this site and the OpenBSD project exists or is implied.