01-14-2009
I got it working. Using "printf" instead of "print" did the trick.
10 More Discussions You Might Find Interesting
1. Solaris
Hello,
If I boot up from install media in single user mode (Solaris 9 - if it matters), will I be able to mount a concatenated volume? I have combined several disks into one non-os filesystem and I want to be able to mount it while booted in single user mode from cdrom. i.e., mount... (0 Replies)
Discussion started by: calmgreen
0 Replies
2. Shell Programming and Scripting
hello,
I had posted earlier help for a script for splitting concatenated words . The script was supposed to read words from a master file and split concatenated words in the slave/input file.
Thanks to the help I got, the following script which works very well was posted. It detects residues by... (14 Replies)
Discussion started by: gimley
14 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Is there a way to get NON unique lines from 2 or more concatenated files?
Basically I have several files which are very similar with the exception of few lines and I want to find out which lines are different in each file. Very simple example is
file1 contains:
1
2
3
4
5file2... (122 Replies)
Discussion started by: pawannoel
122 Replies
4. Solaris
Hi
I need to add new slice to existing concatenated volume. Please let me know the process to do the same
I have d0 concatenated volume which consist of c1t0d0s7 & c1t2d0s0
bash-3.00# df -h /export/home
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 ... (3 Replies)
Discussion started by: sb200
3 Replies
5. Shell Programming and Scripting
How would I go about storing a list of files in a sub-directory into a variable for argument passing? (2 Replies)
Discussion started by: ChazZeromus
2 Replies
6. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
7. Shell Programming and Scripting
Hello everyone,
Maybe somebody could help me with an awk script.
I have this input (field separator is comma ","):
547894982,M|N|J,U|Q|P,98,101,0,1,1
234900027,M|N|J,U|Q|P,98,101,0,1,1
234900023,M|N|J,U|Q|P,98,54,3,1,1
234900028,M|H|J,S|Q|P,98,101,0,1,1
234900030,M|N|J,U|F|P,98,101,0,1,1... (2 Replies)
Discussion started by: Ophiuchus
2 Replies
8. Shell Programming and Scripting
file 1
Sun Mar 17 00:01:33 2013 submit , Name="1234"
Sun Mar 17 00:01:33 2013 submit , Name="1344"
Sun Mar 17 00:01:33 2013 submit , Name="1124"
..
..
..
..
Sun Mar 17 00:01:33 2013 submit , Name="8901"
file 2
Sun Mar 17 00:02:47 2013 1234 execute SUCCEEDED
Sun Mar 17... (24 Replies)
Discussion started by: aravindj80
24 Replies
9. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
10. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
LEARN ABOUT PHP
is_uploaded_file
IS_UPLOADED_FILE(3) 1 IS_UPLOADED_FILE(3)
is_uploaded_file - Tells whether the file was uploaded via HTTP POST
SYNOPSIS
bool is_uploaded_file (string $filename)
DESCRIPTION
Returns TRUE if the file named by $filename was uploaded via HTTP POST. This is useful to help ensure that a malicious user hasn't tried
to trick the script into working on files upon which it should not be working--for instance, /etc/passwd.
This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to
the user, or even to other users on the same system.
For proper working, the function is_uploaded_file(3) needs an argument like $_FILES['userfile']['tmp_name'], - the name of the uploaded
file on the client's machine $_FILES['userfile']['name'] does not work.
PARAMETERS
o $filename
- The filename being checked.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
is_uploaded_file(3) example
<?php
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
echo "File ". $_FILES['userfile']['name'] ." uploaded successfully.
";
echo "Displaying contents
";
readfile($_FILES['userfile']['tmp_name']);
} else {
echo "Possible file upload attack: ";
echo "filename '". $_FILES['userfile']['tmp_name'] . "'.";
}
?>
SEE ALSO
move_uploaded_file(3), $_FILES, See Handling file uploads for a simple usage example..
PHP Documentation Group IS_UPLOADED_FILE(3)