09-04-2008
you mean you want to read the file line by line???
and put each line in path and write mkdir -p $path??
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to create a file which contains the list of all the files present in that directory.
e.g.,
ls /export/home/user/*.dat > list_file.dat
but what i am getting is:
$ ls /export/home/user/*.dat > list_file.dat
/export/home/user/*.dat: No such file or directory
But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies
2. Shell Programming and Scripting
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies
3. Shell Programming and Scripting
Hi,
We have almost 45,000 data files created by a script daily. The file names are of format-ODS.POS.<pharmacyid>.<table name>.<timestamp>.dat. There will be one data file like this for each pharmacy and each table.(Totally around 45,000)
The requirement is to create a control file for each... (2 Replies)
Discussion started by: Maya_Pillai
2 Replies
4. Shell Programming and Scripting
Hi,
I got a requirement to automate the process.
We have SLA files, there are some 80 SLA files comes from 1.30pm - 5.30pm.
I was asked to write a script to check for the SLA files in the load directory, if the files come then we got to send the mail to the group, if the mails doesnt come... (1 Reply)
Discussion started by: afahmed
1 Replies
5. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
6. Shell Programming and Scripting
Hi,
I want to compare two files based on the data in their first column. Both the files are not equal in their number of columns and number of entries or rows.
The entries (only the first column) of the file1 should be compared with the entries (only the first column) of the file2. If the... (3 Replies)
Discussion started by: begin_shell
3 Replies
7. Shell Programming and Scripting
Hi members,
I have a file with lots of text like this:
asdsfkm
dfsfomnow i want to extract only the rows with HUMAN as its 1st column
for this I used :
ruby -ne 'print if /^Human/; exit if /^TER/' $line | awk 'print $1, "\t"$2, "\t"$3, "\t"$4, "\t"$5}' >$line"new"
This is creating a file... (1 Reply)
Discussion started by: CAch
1 Replies
8. Shell Programming and Scripting
Hi,
Need some help with creating a file from input steam. Meaning from following command myfunc should be able to store the input stream to a file.
echo a b c | myfunc
The file thus created should have -
a
b
c
Here's what I've tried in myfunc() but didn't help -
myfunc() { cat... (3 Replies)
Discussion started by: nexional
3 Replies
9. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
10. Programming
Experts,
Need your help for this. Please support
My motive is to create seperate output file for each Input Files(File 1 and File2) in another folder say(/tmp/finaloutput)
Input files
File 1(1.1.1.1.csv)
a,b,c
43,17104773,3
45,17104234,4
File 2(2.2.2.2.csv)
a,b,c
43,17104773,1... (2 Replies)
Discussion started by: as7951
2 Replies
LEARN ABOUT DEBIAN
cgi::formbuilder::template::fast
CGI::FormBuilder::Template::Fast(3pm) User Contributed Perl Documentation CGI::FormBuilder::Template::Fast(3pm)
NAME
CGI::FormBuilder::Template::Fast - FormBuilder interface to CGI::FastTemplate
SYNOPSIS
my $form = CGI::FormBuilder->new(
fields => @whatever,
template => {
type => 'Fast',
root => '/path/to/templates',
# use external files
define => {
form => 'form.txt',
field => 'field.txt',
invalid_field => 'invalid_field.txt',
},
# or define inline
define_nofile => {
form => '<html><head></head><body>$START_FORM
<table>$FIELDS</table>$SUBMIT $END_FORM</body></html>',
# etc.
},
},
);
DESCRIPTION
This engine adapts FormBuilder to use "CGI::FastTemplate". Please read these docs carefully, as the usage differs from other template
adapters in several important ways.
You will need to define three templates: "form", "field", and "invalid_field". You can use "define" to point to external files (which is
the recommended "CGI::FastTemplate" style), or "define_nofile"/ "define_raw" to define them inline. The templates in "define_nofile" take
precedence over "define_raw", and both of these take precedence over "define".
my $form = CGI::FormBuilder->new(
# ...
template => {
type => 'FastTemplate',
root => '/path/to/templates',
define => {
form => 'form.txt',
field => 'field.txt',
invalid_field => 'invalid_field.txt',
},
# or, you can define templates directly
define_nofile => {
form => '<html><head></head><body>$START_FORM<table>'
'$FIELDS</table>$SUBMIT $END_FORM</body></html>',
# etc.
},
},
# ...
);
If you use "define" with external templates, you will probably also want to define your template root directory with the "root" parameter.
Within each of the field templates, the following variables are available:
$NAME # $field->name
$FIELD # $field->tag (HTML input tag)
$VALUE # $field->value (first value only!)
$LABEL # $field->label
$COMMENT # $field->comment
$ERROR # $field->error
$REQUIRED # $field->required ? 'required' : 'optional'
All the fields are processed in sequence; valid fields use the "field" template, and invalid fields the "invalid_field" template. The
result from each of these is appended into the $FIELDS variable, which you should use in your "form" template. In the "form" template, you
also have access to these variables:
$TITLE # title of the form
$START_FORM # opening form tag
$SUBMIT # the submit button
$RESET # the reset button
$END_FORM # closing form tag
$JS_HEAD # validation JavaScript
Note that since "CGI::FastTemplate" doesn't use anything other than simple scalar variables, there are no variables corrosponding to the
lists that other engines have (e.g. "fields" or "options" lists in "TT2" or "Text::Template").
SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Template, CGI::FastTemplate
AUTHOR
Copyright (c) 2005-2006 Peter Eichman <peichman@cpan.org>. All Rights Reserved.
Maintained as part of "CGI::FormBuilder" by Nate Wiger <nate@wiger.org>.
This module is free software; you may copy this under the terms of the GNU General Public License, or the Artistic License, copies of which
should have accompanied your Perl kit.
perl v5.14.2 2011-09-16 CGI::FormBuilder::Template::Fast(3pm)