Re: [Evolution] Adding uptime to sig



On Sat, 2004-02-14 at 16:16, Trey Sizemore wrote:
Not so much an Evolution-specific question, but a lot of knowledgeable
email people on the list.  I have a python script that I use currently
in my sig and wanted to add a line to show the output of the 'uptime'
command.
[...]

I don't know anything about python but here are the bash-scripts I use
to render my sig:
m8ram linux:~> cat bin/sig-linux
#!/bin/bash
/home/m8ram/bin/sig-general "<bram-mertens linux be>"

m8ram linux:~> cat bin/sig-general
#!/bin/bash
current_uptime=$(uptime)
current_kernel=$(uname -r)
current_machine=$(uname -m)
current_release="SuSE 8.2 Pro"
mem="128MB"
NAME="Mertens Bram \"M8ram\""
EMAIL=$1
LINUXID="Linux User #249103"

printf "<pre>-- \n"
printf "# %-22s %-29s %22s #\n" "$NAME" "$EMAIL" "$LINUXID"
printf "# %-16s kernel %-15s %-6s %18s RAM #\n" "$current_release" "$current_kernel" "$current_machine" "$mem"
printf "#%70s #\n" "$current_uptime"
printf "</pre>\n"

I use two scripts because I call the sig-general script from another
script as well to create different sigs and because AFAIK it still isn't
possible to call a script with an argument yet from within Evo.

Perhaps you can call your python script inside such a bash script?

HTH
-- 
# Mertens Bram "M8ram"   <bram-mertens linux be>     Linux User #249103 #
# SuSE 8.2 Pro     kernel 2.4.20-4GB      i686                128MB RAM #
#   5:11pm  up 22 days 20:49,  6 users,  load average: 0.02, 0.07, 0.05 #




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]