Sponsored Content
Top Forums Shell Programming and Scripting PHP script to modify .forward files Post 302390368 by adotte on Wednesday 27th of January 2010 05:53:55 PM
Old 01-27-2010
May not be ideal but the whole web interface is written in PHP... i already have a PHP script that just generates the forwarding files from the database, and it works beautifully when you run it from root..b/c only root has the ability to modify all users .forward files.. but I need to figure out how to call this script whenever it needs to be called, from the web interface... i'm relatively inexperienced with linux so any feedback would be helpful.

The way I'm doing it now is way easier than the original approach of piping emails into a script and trying to manually modify the headers and then resend the mail..what a nightmare
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Modify files

Hi everybody, I have a certine file with lots of number, Which I want to add a " in the begging and at the and of each line. Could anyone tell me how can I do it? Cheers (7 Replies)
Discussion started by: amgo
7 Replies

2. UNIX for Advanced & Expert Users

Modify files through scripts

Hello, all I want to implement some actions on the specified files, to modify some contents in the files, as follows: File1: **** name carol birthday 830319 ******* name billy birthday 831001 *************** ____________________________ The... (3 Replies)
Discussion started by: tpltp
3 Replies

3. UNIX for Advanced & Expert Users

Forward Script

Here is wat iam looking for , I need a forward script which sends out a mail to a particular server say (B-server) as soon as it receives a mail from differnt server say A-server. Lets say abc@xyz.com is sending a mail from server A to Server B then the script should automatically send a mail to... (2 Replies)
Discussion started by: sriharan
2 Replies

4. Shell Programming and Scripting

sed: How to modify files in a complex way

Hello, I am new to sed and hope that someone can help me with the following task. I need to modify a txt file which has format like this: xy=CreateDB|head.queue|head.source|head.definition|rtf.edit|rtf.task|rft.cut abc|source|divine|line4|5|true into something like: head.queue=abc... (19 Replies)
Discussion started by: pinkypunky
19 Replies

5. Programming

Modify php script to allow multiple countdowns within one page.

Hi, I have the following php countdown script that counts down to a date and time. Please see the below example: <SCRIPT language="JavaScript" SRC="countdown.php?timezone=US/Pacific&countto=2011-06-25 00:00:00&do=t&data=Sorry, This Offer Has Expired."></SCRIPT> And countdown.php: ... (1 Reply)
Discussion started by: rocket_dog
1 Replies

6. Shell Programming and Scripting

Modify different files at the same time

Hi, I'm having the following problem. I have some files to modify, between a large number of files. I thought the following code aux2=`grep -l 2.2.17 *` print "$aux2" aux3=`ls -l *.ksh | wc -l` print "$aux3" while ; do print "The counter is $aux3" #Add the sed here ... (3 Replies)
Discussion started by: radicaled
3 Replies

7. Ubuntu

Iptables forward traffic to forward chain!!!

Hi, I am new to linux stuff. I want to use linux iptables to configure rule so that all my incoming traffic with protocol "tcp" is forwarded to the "FORWARD CHAIN". The traffic i am dealing with has destination addresss of my machine but i want to block it from coming to input chain and somehow... (0 Replies)
Discussion started by: arsipk
0 Replies

8. Shell Programming and Scripting

append dates going forward from today to certain line in shell script

Hi there, I have a requirement to append dates going forward to a certain line in a file. I'm not sure of how to go about this. Any help will be greatly appreciated. Thanks Slyesco:wall: (2 Replies)
Discussion started by: Slyesco
2 Replies

9. UNIX for Beginners Questions & Answers

Using forward slash in search pattern in perl script

I have existing pattern in the perl script as: my $pattern = "^Line.*?:|^Errors*: |^SEVERE:.*?:|^Null pointer exception occurred"; and I wanted to include below keywords in my search pattern "I/O exception" and "FileNotFoundException"the problem is when I include my pattern like my... (5 Replies)
Discussion started by: ambarginni
5 Replies
THINK(1)						      General Commands Manual							  THINK(1)

NAME
think - you don't have to think, the computer can think for you SYNOPSIS
think [ -detach ] DESCRIPTION
Think simulates a thinking brain. This can be useful if someone is not wanting to think at invocation time or if someone is needing some thinking about something. It can also be helpful if someone's brain is not working correctly at invocation time. When invoked, think will go ahead and look at all of the commands and keystrokes that a user has made during the current login session. Think will then look at what files the user has. From this and what level the user is listed at in the file /usr/lib/think, think will figure out what the user was trying to do when think was invoked. DEVICES
The process that think uses to help a user is greatly aided if the user is wearing a brain interface bus (bib) device. A bib device is normally worn on the head, and if being used, then think will try to see what was going through the users head at the time of invocation. After think does this, it will send electric signals to the users brain, causing the user to type in whatever keystrokes are necessary to accomplish the task that he/she doesn't want to think about. OPTIONS
-detach also known as "Must mother do all of your thinking for you?"-mode. This options causes think to run in the background as a daemon that watches for users who look like they may need assistance. When a user is found to be exercising cluelessness, think will lock up their keyboard and will proceed to execute what seems to be the most likely sequence of commands that the user had intended to execute. This flag may only be used by the super-user. FILES
/dev/brain bib device special file. /usr/lib/think file to indicate various user abilities. The format of this file is a username on each line followed by some whitspace and then a number. The higher the number for a given user, the more likely think is to assume that that user knows what he/she is doing. Unfortunately, what think considers a large number will vary with usage. BUGS
If a user is using a bib device and actually lacks a brain of their own, then there is a high risk that think will take over their (non- existent) minds. This has the upshot that someone other than the user will have to stop the program. (Perhaps this is a feature.) It may illegal in some areas to force users to wear bib devices. AUTHOR
This man page was written by John Guthrie <guthrie@math.upenn.edu> with suggestions from Kevin Whyte <kwhyte@math.upenn.edu> for the alt.sysadmin.recovery man page collection. think version 1.0 April 5, 1996 THINK(1)
All times are GMT -4. The time now is 10:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy