So, I've got a ton of files that I want to go through (ie something like 300,000), and they're all labeled sequentially. However I'm not 100% positive that they are all there.
Is there any way of running through a sequence of numbers, checking if the file is in the folder, if not appending it... (2 Replies)
Hello
I am new to Perl, in fact I am on chapter one of the book. :) However I am in need of a Perl Script faster than I can finish the book. Perhaps someone can help me with my immediate need while I read my book.
I have a directory with hundreds of files that are all named like... (4 Replies)
I have a need to compare 2 files, then print results to file. Need to find items from file2 that are not found in file 1. thanks in advance!
example:
file 1:
abcde=12
fffff=6
bbbb=35
file2:
abcde=12
fffff=6
bbbb=35
ccccc=10
kkkkk=45 (8 Replies)
I have a list containing strings. All strings should have either "smp" or "drw" else it is considered an error. I have written this code below. Any better ideas to tackle this?
set fdrw = 0
set fsmp = 0
foreach f ($Lst)
set fdrwtag = `echo $f | awk '/drw/'`
set fsmptag = `echo $f | awk... (1 Reply)
I'm in the process of migrating a system to some newer hardware (Power 5 to Power 7). I've done these migrations in the past, and have not had any problems. But this system does not see the new network controllers on the Power 7 system. The system was running AIX 5.3 before, I've upgraded it to... (5 Replies)
Hello,
This is a programming question as well as a suse question, so let me know if you think I should post this in programming.
I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following:
sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm
Loaded plugins: fastestmirror
Setting up Local Package... (13 Replies)
I have a fixed width file. The records looks something similar to below:
Type ID SSN NAME .....AND SOME MORE FIELDS
A1 1234 .....
A1 1234 .....
B1 1234 .....
M2 4567 .....
M2 4567 .....
N2 4567 .....
N2 4567 .....
A1 9999
N2 9999
Now if A1 is present then B1 has to be present.... (2 Replies)
The contents of my service file srvtemplate-data-i4-s1.conf is
Description=test service for users
After=network.target local-fs.target
Type=forking
RemainAfterExit=no
PIDFile=/data/i4/srvt.pid
LimitCORE=infinity
EnvironmentFile=%I
.
.
.
WantedBy=multi-user.target (0 Replies)
Discussion started by: rupeshkp728
0 Replies
LEARN ABOUT PHP
eval
EVAL(3) 1 EVAL(3)eval - Evaluate a string as PHP codeSYNOPSIS
mixed eval (string $code)
DESCRIPTION
Evaluates the given $code as PHP.
Caution
The eval(3) language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged.
If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user
provided data into it without properly validating it beforehand.
PARAMETERS
o $code
- Valid PHP code to be evaluated. The code mustn't be wrapped in opening and closing PHP tags, i.e. 'echo "Hi!";' must be passed
instead of '<? echo "Hi!"; >'. It is still possible to leave and reenter PHP mode though using the appropriate PHP tags, e.g.
'echo "In PHP mode!"; ?>In HTML mode!<? echo "Back in PHP mode!";'. Apart from that the passed code must be valid PHP. This
includes that all statements must be properly terminated using a semicolon. 'echo "Hi!"' for example will cause a parse error,
whereas 'echo "Hi!";' will work. A return statement will immediately terminate the evaluation of the code. The code will be exe-
cuted in the scope of the code calling eval(3). Thus any variables defined or changed in the eval(3) call will remain visible
after it terminates.
RETURN VALUES eval(3) returns NULL unless return is called in the evaluated code, in which case the value passed to return is returned. If there is a
parse error in the evaluated code, eval(3) returns FALSE and execution of the following code continues normally. It is not possible to
catch a parse error in eval(3) using set_error_handler(3).
EXAMPLES
Example #1
eval(3) example - simple text merge
<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "
";
eval("$str = "$str";");
echo $str. "
";
?>
The above example will output:
This is a $string with my $name in it.
This is a cup with my coffee in it.
NOTES
Note
Because this is a language construct and not a function, it cannot be called using variable functions.
Tip
As with anything that outputs its result directly to the browser, the output-control functions can be used to capture the output of
this function, and save it in a string (for example).
Note
In case of a fatal error in the evaluated code, the whole script exits.
SEE ALSO call_user_func(3).
PHP Documentation Group EVAL(3)