Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Listing directories and sub directories Post 302340831 by mrtiller on Tuesday 4th of August 2009 11:41:56 AM
Old 08-04-2009
Quote:
Originally Posted by qasim
That's lovely.Thank you very much.
I 'll really appreciate if somebody would let me know what's wrong with my code (so i could improve my scripting skills)
Regards,
Qasim
Try declaring the variables used by the function to be local
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

files and directories listing

Hello: I need to list some files into some directories ordered by size. i need help! BEst regards Alberto (1 Reply)
Discussion started by: bbolson
1 Replies

2. UNIX for Dummies Questions & Answers

Listing directories and ${1:+$1/}*

Hi I have 2 questions: Q1 - What does ${1:+$1/}* mean? I guess it lists all files in current directory - Could any one explain how this expression works? Q2 - I am trying to list directories only in current path - I know that ls could be used but I thought I'd give find a try. I need to... (5 Replies)
Discussion started by: GMMike
5 Replies

3. UNIX for Dummies Questions & Answers

Listing Unique directories.

Hi, Simple question. If i could find a file been listed in many dirctories, how to get the unique list of directories. find / -name "abc*" --> will give me list of directories. /home/abc.txt /home/ddd/abcd.txt /home/ddd/abcde/txt So how to get /home /home/ddd Thanks in... (2 Replies)
Discussion started by: deepakwins
2 Replies

4. UNIX for Advanced & Expert Users

Listing directories and sub directories

Hey there, i am trying to list all the directories and sub directories of a file system, but am having a bit of trouble. ls -lR|grep \/|grep '^\.' >> input.dat i used this statement to list all the directories and sub directories and output them to a file when i try to print them out on... (3 Replies)
Discussion started by: jinxor
3 Replies

5. UNIX for Advanced & Expert Users

listing of directories with / ...not to use ls -F

Hi When im listing (ls -al ) its listing directories without / at the end of directories dir1 dir2 dir3 and i need to list directories with dir1/ dir2/ dir3/ and this should not be made by command ls -F / should be embedded at the last since one of the scripts reads directories... (1 Reply)
Discussion started by: vasanthan
1 Replies

6. UNIX for Dummies Questions & Answers

listing of directories with / at end...without ls -F

Hi When im listing (ls -al ) its listing directories without / at the end of directories dir1 dir2 dir3 and i need to list directories with dir1/ dir2/ dir3/ and this should not be made by command ls -F / should be embedded at the last since one of the scripts reads... (10 Replies)
Discussion started by: vasanthan
10 Replies

7. Shell Programming and Scripting

listing directories alone

ls lists all files and sub directories in the current directory but how to list only the sub directories and not the files? (2 Replies)
Discussion started by: bbala
2 Replies

8. Shell Programming and Scripting

Listing non empty directories

Hi Gurus, How to list directories that are non-empty and non-hidden Thanks in advance (2 Replies)
Discussion started by: kinny
2 Replies

9. Shell Programming and Scripting

listing directories and sub directories with time and name options

Hello all! I'm looking to list directories and sub-directories of a path, on this forum I found this command: find $path -type d -exec ls -ld {} \; The issue I have is that with a simple ls, the list is listed by name, and using -t I get it by time. How could I list directories and sub... (5 Replies)
Discussion started by: nomadvisuals
5 Replies

10. Shell Programming and Scripting

listing directories with more than x files

How can I find and print the directories on a server that have more than 5,000 files? There's some spam emails and I'm trying to find all directories that have a lot of spam The file count should just be the files directly under that directory, not like the total from all nested directories ... (1 Reply)
Discussion started by: vanessafan99
1 Replies
DB2_ESCAPE_STRING(3)							 1						      DB2_ESCAPE_STRING(3)

db2_escape_string - Used to escape certain characters

SYNOPSIS
string db2_escape_string (string $string_literal) DESCRIPTION
Prepends backslashes to special characters in the string argument. PARAMETERS
o $string_literal - The string that contains special characters that need to be modified. Characters that are prepended with a backslash are x00, , , , ', " and x1a. RETURN VALUES
Returns $string_literal with the special characters noted above prepended with backslashes. EXAMPLES
Example #1 A db2_escape_string(3) example Result of using the db2_escape_string(3) function <?php $conn = db2_connect($database, $user, $password); if ($conn) { $str[0] = "All characters: x00 , , , , ' , " , x1a ."; $str[1] = "Backslash (). Single quote ('). Double quote (")"; $str[2] = "The NULL character must be quoted as well"; $str[3] = "Intersting characters: x1a , x00 ."; $str[4] = "Nothing to quote"; $str[5] = 200676; $str[6] = ""; foreach( $str as $string ) { echo "db2_escape_string: " . db2_escape_string($string). " "; } } ?> The above example will output: db2_escape_string: All characters: , , , \ , ' , " ,  . db2_escape_string: Backslash (\). Single quote ('). Double quote (") db2_escape_string: The NULL character must be quoted as well db2_escape_string: Intersting characters:  , . db2_escape_string: Nothing to quote db2_escape_string: 200676 db2_escape_string: SEE ALSO
db2_prepare(3). PHP Documentation Group DB2_ESCAPE_STRING(3)
All times are GMT -4. The time now is 04:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy