Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-09-2003, 02:37 PM   #1
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Rep: Reputation: 30
Is it possible to make a "file" that can change its output when accessed?

I'm trying to get an email program that doesn't have a random signature feature to use random signatures. All it has is a place to specify a single file as the signature file. Specifying a shell script that will output a random signature doesn't work, I just get part of the shell script as my signature.

Is there some way to create something that will, when accessed as if it were a file, be able to generate different output?
Old 05-09-2003, 02:44 PM   #2
Senior Member
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Maybe have a cron job run a script which rotates/randomises where a link goes to on your harddrive, and have the email program use the link file as the sig.
Old 05-09-2003, 02:46 PM   #3
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I don't know what client you are using but have you tried things like adding backticks?
Old 05-09-2003, 02:49 PM   #4
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Here's what I do:
Check out:
Boris' Taglines
Then each time the tagline is called it generates a random quote into a .signature file, which is then called by my mail program (kmail) each time. Since the .signature file is randomly created each time the tagline is called, I just have to reference to that for my signature

Old 05-09-2003, 07:06 PM   #5
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Original Poster
Rep: Reputation: 30
Thank you everybody!
Old 05-11-2003, 08:30 PM   #6
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 49
I use pine, which allows pipes:

in ~/.pinerc:
#!/usr/bin/env sh
echo "--Moses"
echo ""
echo "The Semi-Random Fortune for "`date`" :"
echo ""

Last edited by moses; 05-11-2003 at 08:33 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 2: Screen Resolution can not change from "800X600" to "1024X 768" suhaimi_sj Fedora - Installation 18 12-17-2009 03:29 AM
change kernel configurations when use "make oldconfig" Gijet Red Hat 4 10-09-2006 07:23 PM
mkraid output "[uEUEMMno MD device file in /dev" bruce1271 Linux - Software 6 03-21-2004 09:25 PM
Can I redirect script output to a file without ">> $LOGFILE" at the end of each line davee Linux - General 1 12-19-2003 05:01 AM
qmail: strange output of "file" command slowleak Linux - Security 1 08-10-2001 10:40 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration