General :: Procmail Executing Perl Script
Jan 13, 2011
I have procmail parsing the subject line of incoming e-mail and depositing individual files in a folder that match the procmail recipe.I want to have that recipe spawn a perl script to parse the file to pull out specific information. I've googled this and found many examples but none of them work.When it finds a matching inbound message it logs it correctly in the charge.log file, writes the message in charges/new/xxx but skips the /home/rowan/billing.pl script.
View 2 Replies
ADVERTISEMENT
Jul 30, 2011
I want to execute a awk command, which reads from txt files and sums the numbers from the first column for those listed only inside a <init> block -- The awk command is like
Code:
awk '/</?init>/{x = !x}x{a++}x && a > 2{sum+=$1}END{printf"%E" "
", sum}
So, I want to execute it inside a perl script, and execute the awk command for the infile which is also defined outside awk loop, ie doing something like
Code:
foreach $infile (@ARGV) {
$gzin = gzopen($infile, "r") || die ("Couldn't open file $infile
");
# No. events and cross-section from current file
[code]....
View 1 Replies
View Related
Feb 6, 2010
Is it possible to execute a perl script which in a linux machine from a windows machine?I have to trigger its execution from my windows machine.
View 1 Replies
View Related
Mar 13, 2011
I've spent pretty much the whole night trying to figure out how I can achieve the following: If a certain Keyword, say [key], is in the subject line, then the email is forwarded to a list of people.
My recipe (now) looks like this:
Code:
:0
* ^Subject: .*[key].*
! my-email@gmail.com
The (verbose) procmail logfile gives me this:
[Code]....
Is my recipe wrong in any way? I pretty much copied it from available ones.
It's a university server, so I'm no admin, just a user. How can I figure out whether some setting that the admin made prevents procmail from calling sendmail or whatever?
View 3 Replies
View Related
Feb 26, 2010
I am trying to set up mutt with fetchmail and procmail on server space that's not mine. I have access to /home/myusername but not to /var/spool/myusername. Everything seems to work well, but I have no idea where fetchmail (or procmail) is dropping off my mail.
View 3 Replies
View Related
Sep 18, 2010
How do I write a procmail recipe that executes a shell script without affecting delivery?(in this case, something that sends me a DM via Twitter) I don't want to affect further processing of the message - it should continue on its way and the output of the script should be ignored.
View 1 Replies
View Related
Dec 17, 2010
I have a small problem with Perl and Apache.
If I use "#!/usr/bin/perl" in the beginning of a perl script the script won't work if the script is at all complicated. Simple scripts like "Hello World" works.
But if I use "#!/usr/bin/perl -w" in the beginning all scripts work?
If I don't use the -w this is whats in the logs:
(2)No such file or directory: exec of '/home/test.net/html/cgi-bin/uh/meny.pl' failed
Premature end of script headers: meny.pl
When I use the -w in the script the error-log shows me this.
meny.pl: Name "main::http_path_cgi" used only once: possible typo at /home/test.net/html/cgi-bin/uh/meny.pl line 24.
View 1 Replies
View Related
Aug 11, 2010
I am new here and want to lern CentOS. Current I have installed CentOS 5.5 x64 and Perl 5.8.8. Now i have install Perl 5.12.1 which located to /usr/local/bin/perl. But how I can move it to /usr/bin/perl so root based on Perl 5.12.1?
View 7 Replies
View Related
Jan 14, 2010
My present working is
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/demo/c++ #
Now I want to run "python scons/scons.py" located in
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/ #
I tried
Code:
../../python scons/scons.py
From the above stated PWD but it resulted in the following:
Code:
bash: ../../python: No such file or directory
What is the way to execute a file of some other directory from the PWD!
View 14 Replies
View Related
Jun 16, 2011
Running following script for checking root ssh login status.
Code:
Flag=`cat /etc/ssh/sshd_config | grep "^PermitRootLogin"`
if [ -z "$Flag" ]
then
[Code].....
View 1 Replies
View Related
Aug 13, 2010
I have a USB modem on a Debian install that I want to be able to use AT commands to diagnose, specifically for obtaining signal strength (RSSI). I know the command for this is AT+CSQ but I cannot seem to get the interface for issuing AT commands to work.
The modem is using /dev/ttyACM0 and when I try to use minicom, I type in AT commands and nothing is echoed to the screen (Yes, echo is turned on). Maybe I just don't know how to use minicom correctly.
View 9 Replies
View Related
Jul 15, 2010
Code:
#!/usr/bin/awk -f
BEGIN{ FS=":"}
{
"groups "$1 | getline grps
[code]....
View 5 Replies
View Related
Aug 6, 2010
I have a some c source code files that i have to copy to linux machine from a windows machine over a network. This source code folder has to be copied into a particular directory structure in the linux system at the other end. After copying the file into the appropriate folder in the linux server i have to instruct the linux machine to make(using the make file that is there with the c files) this source code from the windows machine. Does anyone have any idea in regard to how this can be implemented?? i am trying to have a gui client that has the above mentioned options(copying and inserting the c files into the appropriate directory and then for making the files and getting the executable.)
View 3 Replies
View Related
Jul 7, 2010
I am trying to launch the perl config, but when I do so I can an weird error.It seems to be that it does not regonize perl ?
conf.pl: line 11: =: command not found
conf.pl: line 19: my: command not found
conf.pl: line 20: syntax error near unexpected token `{'
[code]...
View 2 Replies
View Related
Aug 14, 2010
I recently reinstalled the B module for perl. Now I found out it didn't just do that, it installed a whole new copy of perl into /usr/local/bin/perl. When I type 'which perl' at the terminal, it says '/usr/local/bin/perl' instead of '/usr/bin/perl'. Normally, this wouldn't bother me. But I installed the one in local/bin without threading support. The one that comes with the system already is build with threading support, which is why I want to switch back to the system perl, and possibly remove the one in /usr/local/bin.
So how do I change it so that the result of 'which perl' returns as '/usr/bin/perl'? And what do I have to do to remove /usr/local/bin/perl?
The reason I need threading support is because I'm designing a file copier that copies several chunks of a file simultaneously to speed up the copying process. Guaranteed a useful script if it works.
View 7 Replies
View Related
Nov 16, 2010
i want to do a setting to dynamically monitor my Work Station on my Wifi network.
I've got my name server BIND and my dhcpd server all of that under linux working perfectly. But i didn't find any option to execute a script when dhcp give an IP to a machine. I would like to know if there is a way to do that. If there is no options for that i'll use the log files.
View 1 Replies
View Related
Dec 17, 2010
I tried to execute a shell command by M-! cmd RET but it did not work.M-! does not turn up in the microbuffer no matter how many times I press Alt+!.But if I go to Tools menu and select Shell Command... option then it writes M-! to the microbuffer and everything works fine.What is the problem here?
View 2 Replies
View Related
Jun 15, 2011
I am running to a weird issue: for some reason when I try to run a crontab script which has these two operations:
#!/bin/sh
DATE=`date +%F`
but when I reduce this script to the first sql backup only and I use another cron job to put this dump file to the folder it goes through...weird isn't it?so 1+2 in 1 cronjob don't work but 1 in 1 cronjob and 2 in another cronjob it works perfect. any thoughts?
View 3 Replies
View Related
Sep 17, 2010
I got segmentation fault error when I execute "procinfo -a" but not a problem when I just execute procinfo.
View 3 Replies
View Related
May 16, 2011
I want login.sh shell script executing automaticaly whenever i open the console..?and also logout.sh shell script executing automaticaly whenever close the console.
View 1 Replies
View Related
May 27, 2011
I'm trying to run an application from the command prompt. I've set the path in .bashrc. My executable file and all other files needed by it are saved in the same directory as the path. When I enter the executable name to run it, I get an error message saying that the command is not found.
View 14 Replies
View Related
Dec 21, 2010
i have recently started a bit of sh coding. i was trying out sm commands from an sh file.
#!/bin/bash
txt1="top > temp.txt"
eval $txt1
[code]....
View 14 Replies
View Related
Apr 13, 2010
i just want to know whether we can execute the commands in invisible mode in linux. i.e.the command we typed must be executed but should not be visible.is it possible.
if not,then how the password we are typing is not visible in linux,while creating or entering password for users.
View 12 Replies
View Related
Jul 8, 2010
For routine tasks i have to execute commands on machines running both winxp and linux. I usually do it via telnet. But the process is very manual as i have to authenticate for each machine then specify the command.
Is there any way that i could automate this job using a script or so?
View 10 Replies
View Related
Nov 22, 2010
i have n files and each file has 5-6 .sql files.Now I need to wrie a shell script that executes all the n files in parellel and for each n file the .sql files sequentially.eg
CRM_File CM_file AP_file
crm_file_1425.sql
cm_file_5789.sql
ap_file_4124.sql
[code]....
run CRM_File CM_file AP_file in parellel and each file under CRM_File,CM_file,AP_file sequentially.
View 6 Replies
View Related
Jun 30, 2010
I am running Yellow Dog Linux release 6.2(Pyxis) on my PS3. I would like to compile and run C programs that utilize OpenMP for parallel programming. Unfortunately, I have not been very successful. I am able to compile programs containing OpenMP statements error free, but when I attempt to execute the binaries I receive the following error: Code: ./file: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory Compiling programs without OpenMP statements works fine.
Because it has to do something with missing libraries, I am not sure if knowing the executable search paths may help in diagnosis, but when echoing the path environment variable:
[Code]...
The version of GCC on this machine, 4.1.2 20080704 (Red Hat 4.1.2-44), is identical to the ones I have on two other machines (CentOS release 5.3 (Final) and CentOS release 5.4 (Final)) and they both compile and execute OpenMP code flawlessly. I have tried building and installing another version of GCC that would possibly include the OpenMP libraries, since, according to some sources, GCC has only supported OpenMP since version 4.2. But I have not been successful with that either (that problem would make a good second thread.)
View 3 Replies
View Related
Jul 1, 2011
In my code I want to have two different functions to be executed simultaneously (in parallel) in a single processor system. I tried to use pthreads but they happened to be executed one after another. I have heard about fork, some saying that its no longer recommended since its functions can be achieved by pthreads.
View 1 Replies
View Related
Feb 17, 2010
How do I let user Y write in folder A only when executing script X?
View 3 Replies
View Related
Aug 20, 2010
I have the following command:ssh $USER@$HOST "ls /ops/pkg/ec/`grep "PKRTS" /ops/pkg/ec | awk '{print $1}'`* > /tmp/tmp_file"What the above SHOULD do..is, ssh to the host then execute the command.The command should first execute the grep and awk between the back ticks, and generate a file name, then ls using that filename* and write that data to a temp file.However, it executes the grep and awk before even SSH'ing and the command that goes to the server is simply an "ls /ops/pkg/ec/* > /tmp/tmp_file" since the grep and awk return nothing on the local machine.
View 1 Replies
View Related
Jun 29, 2011
I'm using Ubuntu and I'm programing with eclipse CDT. My goal is to execute a php file and read the output to my c++ program. To do so I thought I should use fork(), dup2() and execl. When in shell, the call "php myscript.php" worked just fine, but when in c++ I tried:
execl("usr/bin/php", "php", "home/geiger/workspace/SemiServer/server_content/myscript.php", NULL);
And it didn't work (the process wasn't terminated and I got no output). I tried different version of this call, like losing the "php" string and/or drop "home/geiger" from the path string, to no better result.
View 1 Replies
View Related