What is the smartest way to just extract file name from a full path name.
e.g. if I have
/usr/sanjay/bin/file_name.c
I want only file_name.c
Sanjay (2 Replies)
Im trying to extract a directory from a path entered by the user
Lets say the path is
path=/home/bliss/files/myfile.txt
i wanna extract "/home/bliss/files" from $path ... how can i do this? (4 Replies)
Hi ,
Hi I want to know how can i extract file path using sed?
Eg: C:/folder1/abc/file.txt
Now , i want C:/folder1/abc/ only, So that i can move to that directory containing that file . So how can i do it using sed?
Thanks in Advance
Sarbjit (2 Replies)
Hi,
Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable?
for eg: suppose the PATH is being set as follows
PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4
... (2 Replies)
hello,
i have a configuration file app.conf under /tmp, containing values like :
param1=/data/something
param2=/data/somethingelse
i have a bash script that has to list the files under the path that corresponds to param2 :
#!/bin/bash
dir=$(cat tmp/app.conf | grep param2 | sed ... (6 Replies)
Hi,
I have following path:
set file_path = D:/forums/prac/somedir/new1/file1.txt
or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt
I need to grep "somedir" from file path. In this case preceding directory "prac" remains same for both the paths, but directories preceding... (7 Replies)
Hi,
I want to remove a directory path from a file starting with the bracket using sed command.
eg.
(cd /man/abc/def ; \
aaaaa
bbbb
(cd /man/aaaa/aa; \
op.
aaaaa
bbbb
The "(cd /man" is to be consideres as the start.
I tries the below thing, but it didnt worked. Can anyone help.... (3 Replies)
Hi,
I am trying to use sed to replace a file path within all the .lay (.txt) files in a folder. I feel that this should be easy but I can't get it to work no matter what i try.
I'm using cygwin.
For a .txt file containing the below line I want to replace this file path with a new one.
... (1 Reply)
Hi,,
I have the line below in a file:
$!VarSet |LFDSFN1| = '"E:\APC\Trials\20140705_427_Prototype Trial\Data\T4_20140705_Trial_Cycle_Data_13_T_Norm.txt" "VERSION=100 FILEEXT=\"*.txt\" FILEDESC=\"General Text\" "+""+"TITLE{SEARCH=NONE NAME=\"New Dataset\" LINE=1I want to write a script to change... (2 Replies)
I need to manipulate one Database file on Solaris 11 in which contains more than 5000 lines of data file path like this:
'/data1/oradata/DBNAME/system01.dbf',
'/data7/oradata/DBNAME/undotbs1_01.dbf',
'/data1/oradata/DBNAME/sysaux01.dbf',
'/data28/oradata/DBNAME/userdata01.dbf',
... (6 Replies)
Discussion started by: duke0001
6 Replies
LEARN ABOUT PHP
get_defined_functions
GET_DEFINED_FUNCTIONS(3) 1 GET_DEFINED_FUNCTIONS(3)get_defined_functions - Returns an array of all defined functionsSYNOPSIS
array get_defined_functions (void )
DESCRIPTION
Gets an array of all defined functions.
RETURN VALUES
Returns a multidimensional array containing a list of all defined functions, both built-in (internal) and user-defined. The internal func-
tions will be accessible via $arr["internal"], and the user defined ones using $arr["user"] (see example below).
EXAMPLES
Example #1
get_defined_functions(3) example
<?php
function myrow($id, $data)
{
return "<tr><th>$id</th><td>$data</td></tr>
";
}
$arr = get_defined_functions();
print_r($arr);
?>
The above example will output something similar to:
Array
(
[internal] => Array
(
[0] => zend_version
[1] => func_num_args
[2] => func_get_arg
[3] => func_get_args
[4] => strlen
[5] => strcmp
[6] => strncmp
...
[750] => bcscale
[751] => bccomp
)
[user] => Array
(
[0] => myrow
)
)
SEE ALSO function_exists(3), get_defined_vars(3), get_defined_constants(3), get_declared_classes(3).
PHP Documentation Group GET_DEFINED_FUNCTIONS(3)