List the file names available on FTP server before selecting the required file
Below is my script code.which shows the environment name and then fetch the file from the ftp server but I am facing one issue.The script should be run in both way.We can pass the arguments with script and select the environment name then file name.Here the issue is I am not able to list the files which are residing on the ftp server server so that the user can select the file.
Hi,
I am able to do this by brute force but I am just curious if there is a better way of handling things. Basically the scenario is something like this:
There are a number of files in a directory:
rib.20071224.1759.gz 24-Dec-2007 17:59 132K
rib.20071224.1959.gz 24-Dec-2007... (7 Replies)
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Hey all,
i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file.
any help is appreciated...thank you in advance (1 Reply)
I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile).
The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
I have the following list of file names stored in $fnames, so that if I do
foreach f ($fnames)
echo "$f"
end
I will get
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run3... (3 Replies)
Hi Experts,
Here is my scenario:
Am maintaining a file which has list of logs with complete path and file names like bleow
a/b/c/Daily/file1_20111012.log
d/e/f/Monthly/file1_20111001.log
g/h/Daily/file1_20110120.log
i/Daily/file1_20110220.log
How to copy the file names frm the list... (7 Replies)
Hi All,
I have a .txt file with the list of filenames as given below.
/dev_data/dev3/ctl/20120622_Employee.txt
/dev_data/dev3/ctl/20120623_Employee.txt
/dev_data/dev3/ctl/20120624_Employee.txt
I want to read this file & write the dates alone from the filenames into a .done file.
... (6 Replies)
Hi All,
Can any one help me to list out the directory names which contain the specified file.
See for example
File name : file.201307014.LKT
Have the directory structure as below.
/app/work/data/INDIA/file.201307014.LKT
/app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies
LEARN ABOUT LINUX
edoc_extract
edoc_extract(3erl) Erlang Module Definition edoc_extract(3erl)NAME
edoc_extract - EDoc documentation extraction.
DESCRIPTION
EDoc documentation extraction.
DATA TYPES
edoc_env() = edoc_env() (see module edoc_lib) :
filename() = filename() (see module file) :
proplist() = property() (see module proplists) :
syntaxTree() = syntaxTree() (see module erl_syntax) :
t() = t1() :
Some docs of t/0; Further docs of t/0. The same thing using -type: -type t() :: t1(). % Some docs of t/0; Further docs of t/0.
EXPORTS
file(File::filename(), Context, Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
Types Context = overview | package
Tags = [term()]
Reason = term()
Reads a text file and returns the list of tags in the file. Any lines of text before the first tag are ignored. Env is an environ-
ment created by edoc_lib:get_doc_env/4 . Upon error, Reason is an atom returned from the call to file:read_file/1 .
See text/4 for options.
header(File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
Types Tags = [term()]
Reason = term()
Similar to header/5 , but reads the syntax tree and the comments from the specified file.
See also: header/4 , edoc:read_comments/2 , edoc:read_source/2 .
header(Forms, File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Reason}
Types Forms = syntaxTree() | [syntaxTree()]
Tags = [term()]
Reason = term()
Extracts EDoc documentation from commented header file syntax trees. Similar to source/5 , but ignores any documentation that occurs
before a module declaration or a function definition. (Warning messages are printed if content may be ignored.) Env is assumed to
already be set up with a suitable module context.
See also: erl_recomment(3erl) , header/5 .
header(Forms, Comments::[comment() (see module edoc)], File::filename(), Env::edoc_env(), Options::proplist()) -> {ok, Tags} | {error, Rea-
son}
Types Forms = syntaxTree() | [syntaxTree()]
Tags = [term()]
Reason = term()
Similar to header/4 , but first inserts the given comments in the syntax trees. The syntax trees must contain valid position infor-
mation. (Cf. edoc:read_comments/2 .)
See also: erl_recomment(3erl) , header/3 , header/4 .
source(File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module() (see module edoc)}
Types ModuleName = atom()
[term()]
Like source/5 , but reads the syntax tree and the comments from the specified file.
See also: source/4 , edoc:read_comments/2 , edoc:read_source/2 .
source(Forms, File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_module() (see module edoc)}
Types Forms = syntaxTree() | [syntaxTree()]
ModuleName = atom()
Extracts EDoc documentation from commented source code syntax trees. The given Forms must be a single syntax tree of type form_list
, or a list of syntax trees representing "program forms" (cf. edoc:read_source/2 . Env is an environment created by
edoc_lib:get_doc_env/4 . The File argument is used for error reporting and output file name generation only.
See edoc:get_doc/2 for descriptions of the def , hidden , private , and todo options.
See also: erl_recomment(3erl) , source/5 , edoc:read_comments/2 , edoc:read_source/2 .
source(Forms, Comments::[comment() (see module edoc)], File::filename(), Env::edoc_env(), Options::proplist()) -> {ModuleName, edoc_mod-
ule() (see module edoc)}
Types Forms = syntaxTree() | [syntaxTree()]
ModuleName = atom()
Like source/4 , but first inserts the given comments in the syntax trees. The syntax trees must contain valid position information.
(Cf. edoc:read_comments/2 .)
See also: erl_recomment(3erl) , source/3 , source/4 , edoc:read_comments/2 , edoc:read_source/2 .
text(Text::string(), Context, Env::edoc_env(), Options::proplist()) -> Tags
Types Context = overview | package
Tags = [term()]
Returns the list of tags in the text. Any lines of text before the first tag are ignored. Env is an environment created by
edoc_lib:get_doc_env/4 .
See source/4 for a description of the def option.
SEE ALSO
edoc
AUTHORS
Richard Carlsson <richardc@it.uu.se >
edoc 0.7.7 edoc_extract(3erl)