This code is in my 'case' statement and it all else works fine.
The problem I have is that the value in 'procno' is not passed on to the external program (fireit).
It is passing all zeros instead of the actual process number.
By the time I get to this case statement, I know the "Number" and... (1 Reply)
Hi, I have a script that interacts with a config file in the format:
file1.txt
file2.txt
file3.txt
file4.txt
file5.txt
file6.txt
I would like to return the Category, when given the file name. (11 Replies)
I have asked this before but I haven't had any luck so far getting this to work. I use RCS(revision control system). When it runs if I pass the value 'unlock' to $3 its reassigned to $unlock. When I run the command (rcs -u'version number' 'filename') ti will ask me 1-(Do you want to break the lock... (5 Replies)
Hi!
I have a python script that requires arguments and these arguments are file paths. This script works fine when executed like this:
/my_python_script "file_path1" "file_path2"
(i added quotes as some file names may have weird characters)
the issue happens when i launch my python script... (14 Replies)
Hi,
my script is setting a variable with value and this variable is present in my another command that is coming from external file and this command is internally called after this variable is set. but while execution of this command, the value is not retrieved properly.
say,
my script... (5 Replies)
is it possible to assign value to an array variable from an external file?? if yes then how??
I am using below code but its not working.
#!bin/bash
myarray < file_name
echo ${mayarray} (6 Replies)
Hi,
I am trying to write a bash script in which I need to pass a external variable to the awk program. I tired using -v but it not accepting the value.
Here is my sample code.
#!/usr/bin/bash
######################################################################################
####... (5 Replies)
cat a1
scott
robert
tom
test
script :
#!/usr/bin/ksh
for NAME in `cat a1`
do
VALUE=`sqlplus -silent "nobody/bobody01@testq" <<END
set pagesize 0 feedback off verify off heading off echo off
select username from dba_users where username=upper('$NAME');
END`
if ; then
echo... (3 Replies)
Below is the command
mv AP_FLEXCUBE_INTERFACE10.txt FTPYMNTE_`date "+%Y%m%d%H%M%S" | tr '' ''`.TXT
it is changing the file name to a different name according to time stamp dynamically. I want to capture that dynamic file name present in the directory to a variable .
After that i want to... (6 Replies)
I have a code which is using to find duplicates in a files based on column.Below is the same code which is used to find duplicates in my file based on column 1
awk -F'|' '{if (x) { x_count++; print $0; if (x_count == 1) { print x } } x = $0}' FileName >Dup_File.txt
But my requirement here is... (3 Replies)
Discussion started by: ginrkf
3 Replies
LEARN ABOUT DEBIAN
file::sharedir::par
File::ShareDir::PAR(3pm) User Contributed Perl Documentation File::ShareDir::PAR(3pm)NAME
File::ShareDir::PAR - File::ShareDir with PAR support
SYNOPSIS
use File::SharedDir::PAR ':ALL';
# exact same interface as the normal File::ShareDir:
# Where are distribution-level shared data files kept
$dir = dist_dir('File-ShareDir');
# Where are module-level shared data files kept
$dir = module_dir('File::ShareDir');
# Find a specific file in our dist/module shared dir
$file = dist_file( 'File-ShareDir', 'file/name.txt');
$file = module_file('File::ShareDir', 'file/name.txt');
# Like module_file, but search up the inheritance tree
$file = class_file( 'Foo::Bar', 'file/name.txt' );
You may choose to install the "File::ShareDir::PAR" functions into "File::ShareDir" so that they become available globally. In that case,
you must do the following before anybody can import functions from "File::ShareDir":
use File::ShareDir::PAR 'global';
WARNING
This module contains highly experimental code. If you want to load modules from ".par" files using PAR and then access their shared
directory using "File::ShareDir", you probably have no choice but to use it. But beware, here be dragons.
DESCRIPTION
"File::ShareDir::PAR" provides the same functionality as File::ShareDir but tries hard to be compatible with PAR packaged applications.
The problem is, that the concept of having a distribution or module specific share directory becomes a little hazy when you're loading
everything from a single file. PAR uses an @INC hook to intercept any attempt to load a module. File::ShareDir uses the directory
structure that is typically found in the directories that are listed in @INC for storing the shared data. In a "PAR" environment, this is
not necessarily possible.
When you call one of the functions that this module provides, it will take care to search in any of the currently loaded ".par" files
before scanning @INC. This is the same order of preference you get for loading modules when PAR is in effect. If the path or file you are
asking for is found in one of the loaded ".par" files, that containing ".par" file is extracted and the path returned will point to the
extracted copy on disk.
Depending on how you're using PAR, the files that are extracted this way are either cleaned up after program termination or cached for
further executions. Either way, you're safe if you use the shared data as read-only data. If you write to it, your changes may be lost
after the program ends.
For any further usage information, including the list of exportable functions, please refer to the documentation of File::ShareDir.
SUPPORT
Bugs should always be submitted via the CPAN bug tracker
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-ShareDir-PAR>
For other issues, contact the PAR mailing list: <par@perl.org>
AUTHOR
Steffen Mueller <smueller@cpan.org>
The code was adapted from Adam Kennedy's work on "File::ShareDir"
SEE ALSO
File::ShareDir, File::HomeDir, Module::Install, Module::Install::Share
COPYRIGHT AND LICENSE
Copyright (c) 2008-2010 Steffen Mueller This program is free software; you can redistribute it and/or modify it under the same terms as
Perl itself.
The portions of code that were copied from "File::ShareDir" are:
Copyright (c) 2005, 2006 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as
Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.1 2011-03-08 File::ShareDir::PAR(3pm)