Sponsored Content
Full Discussion: grep with cut option??
Top Forums Shell Programming and Scripting grep with cut option?? Post 302502871 by rdcwayx on Wednesday 9th of March 2011 06:10:32 AM
Old 03-09-2011
Code:
login_user="aaa"
passwd=`awk -v p=$login_user -F: '$0~p {print $2}' $userfile`

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cut -f option

Is it possible to specify at -f option from cut command to cut the last field, according to the separator specified in -d option ? Thanks in advance, (1 Reply)
Discussion started by: 435 Gavea
1 Replies

2. UNIX for Advanced & Expert Users

grep -- option?

Does anyone know what the double dashes in the following grep line mean? grep -c -- "->" The intent of the line is to have a long listing of a directory piped to it, and for it to count off the symbolic links based on the "->" characters. I'm not sure why the scripter decided to search for... (1 Reply)
Discussion started by: dmwatan
1 Replies

3. UNIX for Advanced & Expert Users

grep using -f option

Dear all I have a file with more than one patters to search.Such as pattern.txt. I have to grep these patterns into a data file such as data.txt.how to do this ,i tried /usr/xpg4/bin/grep -f <pattern_file> <data_file> Its not working. why or how to search pattern file ? (3 Replies)
Discussion started by: tkbharani
3 Replies

4. Shell Programming and Scripting

grep -m option

I am new to unix environment, can somebody help me with the grep options like -m. (3 Replies)
Discussion started by: vikas_kesarwani
3 Replies

5. UNIX for Dummies Questions & Answers

grep -v '#' option

Hi, I've the following code in my program. grep 'FILE_PREFIX' /cblconfig |grep -v '#' > $fpfx-filename I'm not sure what second grep does. Can someone explain this command? Thanks (1 Reply)
Discussion started by: ani12345
1 Replies

6. Solaris

Grep -A -B -C option

Hi, Does anyone know why -A/B/C is not working with grep on my solaris box? Thanks, Prince (5 Replies)
Discussion started by: john_prince
5 Replies

7. Solaris

Grep Option

Hi, I was wondering, if there is any option with Grep, so that i can have couple of lines appearing before and after the search line within a result ? Thanks in Advance. Rgds - Prince. (4 Replies)
Discussion started by: john_prince
4 Replies

8. Slackware

How should I cut this line using cut and grep?

not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell. but how must the command be? grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d the delimeter is just a space. can you help meplease. :D (1 Reply)
Discussion started by: garfish
1 Replies

9. UNIX for Dummies Questions & Answers

Use the -B option with grep

I am trying to parse out a file using grep - I would like to use the -B option so that the grep command prints the previous 2 lines if/when my string is matched - listed below are two examples - one with the info I want printed to a new file and one with info I want ignored. Any help with the grep... (6 Replies)
Discussion started by: bjdamon
6 Replies

10. UNIX for Dummies Questions & Answers

Grep -C option not available

grep -C option is not availbale and i am using korn shell. Even -C option in man grep is not showing.. Input file : test.txt 111 333 444 555 aaa bbbb Command : grep -C1 555 test.txt Required output: 444 555 (8 Replies)
Discussion started by: NareshN
8 Replies
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)
All times are GMT -4. The time now is 04:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy