PS1='[\[`if test $? -eq 0; then echo "\e[1;32m"; else echo "\e[1;31m";
fi`\]$?\[\e[0m\]]-[\[\e[0;34m\]\h\[\e[0m\]]-[\[\e[0;34m\]\w\[\e[0m\]]\[\n\]\$
'
Where is that awesome post about the CRC24 to get a nice color for
each hostname ?
There:
On Fri, Aug 28, 2015 at 11:01:45AM +0200, Martijn van Duren wrote:
Here's some potential useful feature from my .profile. It might not be
perfect, but at least it's better then some of the generators I've seen in
production.
# $RANDOM is not portable and in ksh it's limited to 32767.
rand()
On Sat, Aug 29, 2015 at 12:26:37PM +0200, Matthieu Herrb wrote:
| On Fri, Aug 28, 2015 at 11:01:45AM +0200, Martijn van Duren wrote:
| Here's some potential useful feature from my .profile. It might not be
| perfect, but at least it's better then some of the generators I've seen in
|
Here's some potential useful feature from my .profile. It might not be
perfect, but at least it's better then some of the generators I've seen
in production.
# $RANDOM is not portable and in ksh it's limited to 32767.
rand() {
local number
local rdevice
for rdevice in
On Fri, Aug 28, 2015 at 1:20 AM, Alexander Hall alexan...@beard.se wrote:
I'm pretty sure this messes up $? at the prompt. Try:
false
echo $?
You could circumvent this by saving $? at the beginning of the function
and returning it at the end.
Happy to report that this is not the
My back to SCO additions…
#-#
# Print the current directory, hostname user#
#-#
HOST=`hostname`
PS1='$(print -n [${USER}@${HOST%%.*} ;[[ $HOME == $PWD ]] print -n
~ ||([[ ${PWD##*/} == ]] print -n / || print -n
Alexander Hall alexan...@beard.se writes:
[...]
I'm pretty sure this messes up $? at the prompt. Try:
false
echo $?
You could circumvent this by saving $? at the beginning of the function and
returning it at the end.
Here's an excerpt of my .kshrc. The '$' is printed in red if
On August 28, 2015 2:36:38 AM GMT+02:00, T B phreakoci...@gmail.com wrote:
Resurrecting this not-too-old thread. You might find this one useful
if
you run CARP firewalls which gives you a dynamic prompt telling you the
master/backup/other status.
function fwStatus {
IFCONFIG=`ifconfig -a
Resurrecting this not-too-old thread. You might find this one useful if
you run CARP firewalls which gives you a dynamic prompt telling you the
master/backup/other status.
function fwStatus {
IFCONFIG=`ifconfig -a | grep carp:`
NUMCARPS=`echo $IFCONFIG | wc -l`
On Aug 2, 2015, at 8:49 AM, li...@wrant.com wrote:
never
thought of using a shell function in .profile till I read this thread.
...
Functions has always been impressive once you move past the alias
shortcomings (can't handle arguments etc), so also worth a read the
Functions
Hello Vijay,
On Sat 01/08/2015 14:09, Vijay Sankar wrote:
[...]
To quickly see how many files I have in a directory, I use
alias nof='ls -l . | egrep -c '^-''
I have always wondered if there is a better way of doing this.
In general, I would avoid using a pipe when a native command exists
On Sun, Aug 2, 2015 at 6:35 AM, Alessandro DE LAURENZIS
just22@gmail.com wrote:
On Sun 02/08/2015 08:23, Alessandro DE LAURENZIS wrote:
operation); this could probably be more appropriate:
alias nof='find ./ -type f -maxdepth 1 | wc -l'
Ok, that's clearly inefficient because the search
On Sun 02/08/2015 08:23, Alessandro DE LAURENZIS wrote:
[...]
operation); this could probably be more appropriate:
alias nof='find ./ -type f -maxdepth 1 | wc -l'
Ok, that's clearly inefficient because the search is performed in all
subtrees, instead of cwd only; maybe this:
find . ! -name .
On 2015-08-02 08:23, Alessandro DE LAURENZIS wrote:
On Sat 01/08/2015 14:09, Vijay Sankar wrote:
alias nof='ls -l . | egrep -c '^-''
I have always wondered if there is a better way of doing this.
In general, I would avoid using a pipe when a native command exists (and
particularly in this
Quoting Benny Lofgren bl-li...@lofgren.biz:
On 2015-08-02 08:23, Alessandro DE LAURENZIS wrote:
On Sat 01/08/2015 14:09, Vijay Sankar wrote:
alias nof='ls -l . | egrep -c '^-''
I have always wondered if there is a better way of doing this.
In general, I would avoid using a pipe when a
never
thought of using a shell function in .profile till I read this thread.
Maybe redundant but worth checking ksh(1), and search for kshrc, right
after the description and arguments. The section (ENV parameter)
describes strategy to keep your .profile cleaner for login shells and
On 2015-07-31, listas...@dna.uba.ar listas...@dna.uba.ar wrote:
What aliases or custom functions do you use?
Nothing exciting.
Here's a useful one not everybody might know about:
alias doas='doas '
Also, just for kicks I keep these around, although they aren't
terribly useful in a windowing
On 31/07/15 21:25, listas...@dna.uba.ar wrote:
How do you customize your environment?
What aliases or custom functions do you use?
Here's my /etc/profile I think you can find one or two interesting things
in it.
Ouch - this hits a nerve.
@work, we have a Unix environment where the powers
Quoting listas...@dna.uba.ar:
Hello everybody
How do you customize your environment?
What aliases or custom functions do you use?
Here's my /etc/profile I think you can find one or two interesting things
in it.
Show us yours!
(in case wordwrapping breaks long lines:
On Fri, Jul 31, 2015 at 05:25:49PM -0300, listas...@dna.uba.ar wrote:
[...]
How do you customize your environment?
[...]
Colorful prompt with power line glyphs and SCM branch and routing table
id display [0].
What aliases or custom functions do you use?
[...]
My favorites are
alias
On Fri, Jul 31, 2015 at 4:25 PM, listas...@dna.uba.ar wrote:
How do you customize your environment?
What aliases or custom functions do you use?
Here's what I use:
PATH=$HOME/bin:$PATH
EDITOR=vi
export EDITOR
Pretty exciting, no?
Customizations go in $HOME/bin ... and looking at the sort
Nice! I am stealing idea!
Thanks!
Will share what i will be able to.
On Fri, 31 Jul 2015 23:27 listas...@dna.uba.ar wrote:
Hello everybody
How do you customize your environment?
What aliases or custom functions do you use?
Here's my /etc/profile I think you can find one or two
On Fri, Jul 31, 2015 at 05:25:49PM -0300, listas...@dna.uba.ar wrote:
Hello everybody
Hello,
alias ducks='du -cks * |sort -rn |head -11'
I'm stealing this one ;-)
--
Gilles Chehade
https://www.poolp.org @poolpOrg
Hello everybody
How do you customize your environment?
What aliases or custom functions do you use?
Here's my /etc/profile I think you can find one or two interesting things
in it.
Show us yours!
(in case wordwrapping breaks long lines: http://pastie.org/10322761)
Hello everybody
Hello, anonymous.
How do you customize your environment?
Reading man pages mostly, and teraforming using (brain) farts.
What aliases or custom functions do you use?
On the blog over 15 pages across several years, just kidding.
Here's my /etc/profile I think you can find
25 matches
Mail list logo