"And thanks for the alias tip. I will have to park that one away for the time being because as useful as Perl one-liners are, I don't think I'm quite ready to use them that frequently."
I have aliases set up such that they're always available, regardless of frequency of usage.
In ~/.bashrc, I have:
...
if [ -f "${HOME}/.bash_aliases" ]; then
. "${HOME}/.bash_aliases"
fi
...
And ~/.bash_aliases has lines like this:
...
alias vi='vim'
alias view='vim -R'
...
alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -MCarp::Always -E
+'
alias perlb='perl -MO=Deparse,-p -e'
...
alias apache_up='/usr/sbin/apachectl start'
alias apache_down='/usr/sbin/apachectl stop'
...
You may need to adjust to suit whatever shell you're using;
however, the basic principle should be applicable to any UNIX-like system.
I use this with Linux for $work; with Cygwin for personal, home use;
and, up until a year or so ago, with macOS (formerly Mac OS X).
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|