LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 05-09-2003, 03:37 PM   #1
oot
Member
 
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, 03:44 PM   #2
Proud
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, 03:46 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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

Rep: Reputation: 64
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

Cool
 
Old 05-09-2003, 08:06 PM   #5
oot
Member
 
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

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

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

in ~/.pinerc:
Code:
signature-file=~/.sigproc|
~/.sigproc:
Code:
#!/usr/bin/env sh
echo "--Moses"
echo ""
echo "The Semi-Random Fortune for "`date`" :"
echo ""
fortune

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


Reply


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 04:29 AM
change kernel configurations when use "make oldconfig" Gijet Red Hat 4 10-09-2006 08:23 PM
mkraid output "[uEUEMMno MD device file in /dev" bruce1271 Linux - Software 6 03-21-2004 10: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 06:01 AM
qmail: strange output of "file" command slowleak Linux - Security 1 08-10-2001 11:40 PM


All times are GMT -5. The time now is 04:25 AM.

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