i am trying to do something like this :
#!/bin/ksh
# Change to the userid user1
su - user1
#Issue the command to change directory and list files
cd /home/user1/
ls -lrt
exit #Come out of the user1 to root again
#change to user 2
su - user2
cd /home/user2/
ls -lrt... (2 Replies)
hello.,
i have 2 files..
1 file is in this folder
/home/test/ssk/DSA.WLG.20050713211544.20050710.20050713211544
(this part)
other file is in this folder
/home/kk/dev/DSA.WLG.20050711210100.20050710.20050711210100
... (1 Reply)
hi all
i am writing the korn shell script.
i have a SQL script which gives me the folowing output
DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400
DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400
DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
I have this Korn shell script that runs via a cron entry. It runs in a loop "watching" a specific file system for files with a certain name. The file system that it is watching is an upload file system for an FTP server. When files that are the correct name come in, it takes the extension of the... (1 Reply)
I have to solve some exercises in Korn Shell, but i'm having some problems. For example:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
I... (3 Replies)
1. The problem statement, all variables and given/known data:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
2. Relevant commands, code,... (3 Replies)
I have a scenario to implement in Korn shell script. Here it is..
I need to compare two values to see whether they are same or not. The issue is that the values coming in for comparison can be a string or an integer which can be determined during run time only.
Which korn shell comparison... (1 Reply)
Hello,
My requirement is based on Oracle where we run a perl script and it asked some questions.I want to write a wrapper which will answer all these questions.
How is it possible.
Thanks (16 Replies)
There are 4 parameters that I have to pass from korn shell to sql script.
1) I have to check if $1 , $2 , $3 and $4 are null values or not .
How can I do that ?
2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Hi,
I have shell script that I am running under Ubuntu as root.
Is it possible to hide the command window and show the user some sort of progress /random progress bar / or other form of GUI interaction?
On MAC, I have been using Platypus but on Ubuntu I am not sure what to do. (4 Replies)
Discussion started by: naveedanwar4u
4 Replies
LEARN ABOUT DEBIAN
masonx::processdir
MasonX::ProcessDir(3pm) User Contributed Perl Documentation MasonX::ProcessDir(3pm)NAME
MasonX::ProcessDir - Process a directory of Mason 2 templates
VERSION
version 0.02
SYNOPSIS
use MasonX::ProcessDir;
# Generate result files in the same directory as the templates
#
my $pd = MasonX::ProcessDir->new(
dir => '/path/to/dir'
);
$pd->process_dir();
# Generate result files in a separate directory
#
my $pd = MasonX::ProcessDir->new(
source_dir => '/path/to/source/dir',
dest_dir => '/path/to/dest/dir'
);
$pd->process_dir();
DESCRIPTION
Recursively processes a directory of Mason 2 templates, generating a set of result files in the same directory or in a parallel directory.
Every file with suffix ".mc" will be processed, and the results placed in a file of the same name without the suffix. ".mi", autobase and
dhandler files will be used by Mason when processing the templates but will not generate files themselves.
For example, if the source directory contains
Base.mc
httpd.conf.mc
proxy.conf.mc
etc/crontab.mc
blah.mi
somefile.txt
and we run
my $pd = MasonX::ProcessDir->new(
source_dir => '/path/to/source/dir',
dest_dir => '/path/to/dest/dir'
);
$pd->process_dir();
then afterwards the destination directory will contain files
httpd.conf
proxy.conf
etc/crontab
somefile.txt
where foo and bar are the results of processing foo.mc and bar.mc through Mason. Base.mc and blah.mi may be used during Mason processing
but won't generate result files themselves.
This class is a convenience extension of Any::Template::ProcessDir.
CONSTRUCTOR
Specifying directory/directories
o If you want to generate the result files in the same directory as the templates, just specify dir.
my $pd = MasonX::ProcessDir->new(
dir => '/path/to/dir',
...
);
o If you want to generate the result files in a separate directory from the templates, specify source_dir and dest_dir.
my $pd = MasonX::ProcessDir->new(
source_dir => '/path/to/source/dir',
source_dir => '/path/to/dest/dir',
...
);
Mason options
mason_options
An optional hash of options to the Mason interpreter. For example, the default Mason data directory will be ".mason" under the source
directory, but you can override this:
mason_options => { data_dir => '/path/to/data/dir' }
Options inherited from Any::Template::ProcessDir
See Any::Template::ProcessDir for other options, such as
dir_create_mode
file_create_mode
readme_filename
SUPPORT AND DOCUMENTATION
Bugs and feature requests will be tracked at RT:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=MasonX-ProcessDir
bug-masonx-processdir@rt.cpan.org
The latest source code can be browsed and fetched at:
http://github.com/jonswar/perl-masonx-processdir
git clone git://github.com/jonswar/perl-masonx-processdir.git
SEE ALSO
Mason, Any::Template::ProcessDir
AUTHOR
Jonathan Swartz <swartz@pobox.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-03-07 MasonX::ProcessDir(3pm)