I am looking for some suggestions if possible, regarding processing the files using perl script. Scenario is I have a location where new files will be added always. I need to process these files for some validation. I wrote a perl script to do this and I thought I can rename the files once they are processed in that way I dont process the same files again. But now I can't rename the files due to some restrictions. Second thought, to process them based on date stamp but as my perlscript is being automated and runs every one hour to process the files I can't go by date stamp.
I need to count files in a dir which were updated yesterday.
ls -lth | grep -i 'Jul 7' | wc -l
The dir holds files of last 15 days and total count is as 2067476. Is it efficient to count the files using perl? I have developed the following perl script making use of system().
I want to compare the following two tab-delimited .txt files (both were subsets of the original files) by comparing Columns 3 and 4 simultaneously. It is easy to compare C3 because both C3s are just numbers. But how to compare C4s?Basically, in File1, "G,G" = G in File2, "C,C" = C in File2, "A,A" = A in File2, "T,T"= T in File2.In File2, A/T in Column4 just equals "A,T" or "T,A" in Column4 of File1. C/T in Column4 just equals "C,T" or "T,C" in Column4 of File1, and etc.
I am new to perl scripting and wrote a perl script to read the directories and files and count the no of files in each directory and generate a log file. The problem is it is not printing anything to the log file. I am copying the script below.
I need write a script that can compare multiple input files and output a file. The basic idea is:1: All my input files are in the same format2: I want to find in-common lines (in-common 1) from some of my input files (e.g., input1, 2 an 3), and find in-common lines (in-common 2) from the rest of my input files (e.g., input 4,5,6,7). And then, compare in-common1 and in-common2 and remove any overlap from in-common 1.3: Output the remaining in-common 1 file after removing any of its overlap with in-common 2I know how to write this script by putting all the filenames in one script and compare them. But the thing is, if I have more input files, such as 100, it might not be that efficient to write all filenames in one script and compare them.
I am wondering if there is any way to do such as:1: put all input filenames in a text file (file1)2: write a script3: Everytime, when I run this script, it will read in file1 directly no matter how many input files I have, give an output.I want this because I will have more and more input files and I don't wanna add multiple lines in the script just for reading the new inputfiles and compare them with the previous files. So, I guess this is something related to making my script a package or standardize it and make it easy to use in the future no matter how many input files I will have.
I am trying to extract a web page via Google for processing. I am able to create a proper query and test it using cut/paste into the address bar of my firefox browser.
When I attempt to extract the page with wget: wget -O - -q "$query" I do not see the information that is present when I used the browser.
I'm attempting to learn 'processing', the language used on the Arduino but I am having a bad time finding resource because of the poorly chosen name. What I am trying to do is open a pipe to another process/program to use as input to the processing plot program I am writing. I found processing.org but that site is not very helpful. There is plenty of examples of reading from an Arduino from the serial port but I want to read from a program running on my laptop. Both the plot and data accumulator program in the same PC.
I'm running apache2 and I installed php5 with yast. httpd2 -M states that php5 is loaded. /etc/apache2/conf.d/php5.conf is being included in httpd.conf and it contains:
The first line was added by me since that's what mime.types actually contains.
php.ini is in /etc/php5/apache2 and since I was not sure apache/php was finding it I added a PHPIniDir "directive" into httpd.conf. I have not changed it.
Test file is the typical /srv/www/htdocs/info.php with <?php infophp(); ?>
Normal index.htm is working fine. php -a is working fine.
I spent a long afternoon around this configuration and I looked in plenty of pages for solutions. I only do occasional system administration so I might have easily overlooked something trivial, but I run out of ideas.
There is a thread in this web site with a similar problem but no solution:
Php5 not recognized in SUSE 10.2 Apache2
What could be missing/wrong if php5 is loaded and the addhandler is defined? How can I further test?
New to Fedora (from Windows), I am up and running ok with packages from the repository but only half ok with Processing, the Java graphics programming front end from processing.org.Their download gave me a .tgz file which Package Manager extracted for me into a location of my choice and where there is now a "processing" shell script.This works ok and I have managed to create a launcher on the desktop. That starts ok but always with processing's default action of giving you a new and automatically named work file.In Windows an existing Processing file (.pde file) could be "opened-with" Processing. Trying to do similar in Fedora I find that I am expected to nominate an Application to open with but Processing has not installed as an application.I guess the question is how do I promote Processing to be an Application?Or is there a different approach?
Ubuntu 10.04 with an HP d530 SFFFrom lspci:00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)When trying to do sudo apt-get install -f, I get this:
Errors were encountered while processing: libdirac-encoder0 libfaac0
I'm trying to automate the transfer and processing of files between two systems to help test and compare a new server installation. The workflow is a bit complex but I'm basically modifying a script on server 'A' to push a file to server 'B' as standard input to another script.
[Code]...
But no luck. I've tried it without the port in the server_args parameter, without the '-l' option; I've tried having the server parameter set to 'tcpd' and the call to '/bin/nc' in the server_args too. But no success. Can anyone point out what I'm doing wrong with the config? PS. I've restarted xinetd and server B is listening on port 1112 and accepting connections - but nothing gets piped into the script on server B.
I use the below loop to process each file (listed in a text file) with a software. During processing the software asks me to enter a value and continues processing of that file after I enter the value. I have those values stored in a text file "myfile". What I want is to get the values directly from myfile when the software asks "please enter the title:". I dont want to enter them all manually. But i could not figure out how to code this in Bash script.
Code: for ((i=1,i<=$NR,i++)); do --command of the software comes here-- done
I'm working on a simple data processing script.My script uses a loop with getline to check for the value on the next line to decide if it's time to terminate the loop.This works dandy, but the problem is that getline eats that line, which then isn't processed by the rules in the remainder of the script (even though I want it to be). To illustrate what I mean, consider this simple gawk script:
I am attempting to "export" the progress bar from wget display using sed. Basically, we have an app that starts wget to download a large file and we want to show a progress bar. Our application has a dbus interface to receive the download progress.
So we were think of a command like: wget [] | sed [] | dbus-send[] The problem at the moment is, how do you get the matched string out of sed and into dbus-send? I can get the progress string by: sed -u 's/[0-9]*%/&/'
This populated '&' with the correct percentage, but I cannot seem to get this out of sed.
Does anyone know a method of being able to process the complete and literal command line passed to a shell script ? I want to have the command line parameters with ALL characters (including meta characters e.g. $ literally).
So as if there was no shell to substitute or expand parameters nor applying it quoting rules.
I would like to read unix file permissions into a bash array for processing but tbh I have no idea how to do this. Then I will check for each individual access right l, d, x etc.
I have a Python script that copies a couple of DLL's and EXE to a directory before running the EXE. It can be a fresh copy or the files can already be in the target directory and are then overwritten. The script uses shutil.copy() to copy the files and that works but as the files are copying processing continues and the script tries to run the files mid copy, causing an error.
I need a way to wait for the files to finish copying before the script continues. Putting the thread to sleep isn't good enough, calling os.system("copy ...") also doesn't work, using os.path.exist() won't work because the file will exist during the copy.
I just downloaded Tk-804.028 and try to install it (according to the README.linux) but I get:
> perl Makefile.PL /opt/ActivePerl-5.10/bin/perl-static is installed in /opt/ActivePerl-5.10/lib okay PPM for perl5.010001 Test Compiling config/perlrx.c Test Compiling config/pmop.c Test Compiling config/pregcomp2.c
I really would like Perl Qt4 bindings. The best I could find is this:[URL]The problem is that the sources would not compile, and the RPMs are for 32-bit machines.Is there really no such thing as good Perl Qt4 bindings?
I am a newbie on linux and just searching everything about perl scripting and modules nearly 3-4 days. I need a perl script but one of not easy to find on searching google. Okay now I need a perl script which create or recreate (edit) id3 tags (artist, comment, album, year, cover) of mp3 files stored on my linux centos server. I installed MP3::Tag version 1.13 pearl module to my server. I Searched tutorials about how to use it, finally I get through reading id3 tag of mp3 file but not achieve to modify it or create a new id3tag.
These are the details: I have a mp3 file called 1.mp3 this script will process that '1.mp3' file read its id3tag if there is one, than modify or create id3tag for it by my fix artist name for example: '1.mp3' files id3 tag details are like this Artist: Dj xx Year:2010 Title:yyyyy Comment:eerwer Cover: x.jpg
Now via this perl script which uses MP3::TAG I will change it's artist as YYY Title:ttt Comment:cool Cover:t.jpg these are gonna be my fixed values. I mean all '1.mp3' file will have same artist based on script value.
The reason of this script is I will share Dj podcasts on my server and Dj's would have upload their mp3's which has got different id3 tags and cover pics. etc. I want to create more organized podcasts of them by the way I would trigger this perl script via Cronjob.
I want to compare two files in perl, I have two files file1.txt & file2.txt. if column1 on file2.txt match column1 on file1.txt then I want my result on file3.txt (column1 column2 file1.txt + column1 column2 column3 file2.txt). this problem was solved with "awk" but I want to do in perl.