I typed in
and saved it.
I then ran the program ~cs252/bin/scriptAsst.pl
and it started running the tests. When it got to test 28 it says sub3 produced incorrect output on test 28: /Unix/Unix/sub3 '3' '9' '_aardvark.cpp'
Im guessing that it was trying to replace all occurances of '3' with '9' but the output didn't come out correct.
---------- Post updated at 07:21 PM ---------- Previous update was at 06:57 PM ----------
Basically what i need is a for loop to allow it to run through as files as it wants to. Using the following code.
I would like to make the same change in multiple shell script files and would like to know if anyone can be of some help? I would appreciate it. (4 Replies)
I have a shell script similar to:
#!/bin/sh
a=1
source a1.sh -- Modifies a
source a2.sh -- Modifies a
echo "After execution, value of a is $a"
What i need is a1.sh script modify the same variable a and same with a2.sh. Now the echo "After execution, value of a is $a" should print the... (1 Reply)
I have four scripts to run.
My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously.
This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3.
Now my doubt is that... (2 Replies)
Hi,
I need help to split lines from a file into multiple files.
my input look like this:
13
23 45 45 6 7
33 44 55 66 7
13
34 5 6 7 87
45 7 8 8 9
13
44 55 66 77 8
44 66 88 99 6
I want to split every 3 lines from this file to be written to individual files. (3 Replies)
I am learning how to write shell scripts and have come across an issue. I'm trying to write a script that looks for a directory called public_html, and if it finds one, to print the number of lines that contain applet tags (containing '<applet') in all files that end in either .html or .htm that... (7 Replies)
Hi All,
After reading that the sort command in Linux can be made to use many processor cores just by using a simple script which I found on the internet, I was wondering if I can use similar techniques for programs like the awk and sed?
#!/bin/bash
# Usage: psort filename <chunksize>... (7 Replies)
Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. I use the program to change an occurance of a word throughout different files that are being tested. At first i had to Create a new script,... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (6 Replies)
I am not sure what I am doing wrong here. The code should work fine. I have been making small changes insuring that each new bit works. Now running my sed through multiple files I am getting incorrect output. Any help and instruction would be greatly appreciated.
The problem -
Generalize... (10 Replies)
Discussion started by: Lycopene
10 Replies
LEARN ABOUT PHP
mailparse_uudecode_all
MAILPARSE_UUDECODE_ALL(3) 1 MAILPARSE_UUDECODE_ALL(3)mailparse_uudecode_all - Scans the data from fp and extract each embedded uuencoded fileSYNOPSIS
array mailparse_uudecode_all (resource $fp)
DESCRIPTION
Scans the data from the given file pointer and extract each embedded uuencoded file into a temporary file.
PARAMETERS
o $fp
- A valid file pointer.
RETURN VALUES
Returns an array of associative arrays listing filename information.
+-------------+-------------------------------------------------+
| | |
| filename | |
| | |
| | Path to the temporary file name created |
| | |
| | |
|origfilename | |
| | |
| | The original filename, for uuencoded parts only |
| | |
+-------------+-------------------------------------------------+
The first filename entry is the message body. The next entries are the decoded uuencoded files.
EXAMPLES
Example #1
mailparse_uudecode_all(3) example
<?php
$text = <<<EOD
To: fred@example.com
hello, this is some text hello.
blah blah blah.
begin 644 test.txt
/=&AI<R!I<R!A('1E<W0*
`
end
EOD;
$fp = tmpfile();
fwrite($fp, $text);
$data = mailparse_uudecode_all($fp);
echo "BODY
";
readfile($data[0]["filename"]);
echo "UUE ({$data[1]['origfilename']})
";
readfile($data[1]["filename"]);
// Clean up
unlink($data[0]["filename"]);
unlink($data[1]["filename"]);
?>
The above example will output:
BODY
To: fred@example.com
hello, this is some text hello.
blah blah blah.
UUE (test.txt)
this is a test
PHP Documentation Group MAILPARSE_UUDECODE_ALL(3)