i have multiple files like
how to do list files from new_30 to new_50
i have tried this command but it wont work
dir new*{30-50}.txt
my exact requirement is to get line count of these files
the command which work is
FOR %i IN (new*.txt) DO find %i /c /v ""
but at the... (1 Reply)
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
Hi,
I am trying to connect to a remote server using Plink tool. Both my local and remote machines are Windows. On remote server, I have OpenSSH server installed. I am able to run commands on remote machine but there is some problem with long UNC path, which I noticed today.
For... (3 Replies)
The code below works, but takes too many lines and looks awkward:
db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' > numrows.tmp
numrows=$(cat numrows.tmp)
rm numrows.tmp
When I try the... (2 Replies)
I'm trying to open multiple IE windows and enter the same text and press <enter> on each. Here's an example with what I have so far.
REM Open
@echo on
start http://10.1.1.1
ping 1.1.1.1 -n 5 -w 1000 >nul
@echo password
start http://10.1.1.2
ping 1.1.1.1 -n 5 -w 1000 >nul
@echo password... (2 Replies)
Hi,
I have a requirement to run multiple instances of an .exe file present in windows server from unix machine. The number of threads to be invoked is determined dynamically based on a variable field. We will be passing some parameters to windows .exe file for each instance.
I am a unix... (2 Replies)
I'm trying this:$ for n in `ls` ; do xterm -e vim $n & ; done
bash: syntax error near unexpected token `;'
$I want to edit my files all at once, not one at a time. How can I do that? (2 Replies)
I've noticed most of my postings here are because of syntax errors.
So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
At time of installation I have to open the resource. and i have to insert a string serial number in the exe.
please provide me code to edit the exe (in solaris) to insert a serial number which can be used by exe at run time. (6 Replies)
File::SearchPath(3pm) User Contributed Perl Documentation File::SearchPath(3pm)NAME
File::SearchPath - Search for a file in an environment variable path
SYNOPSIS
use File::SearchPath qw/ searchpath /;
$file = searchpath( 'libperl.a', env => 'LD_LIBRARY_PATH' );
$file = searchpath( 'my.cfg', env => 'CFG_DIR', subdir => 'ME' );
$path = searchpath( $file, env => 'PATH', exe => 1 );
$path = searchpath( $file, env => 'PATH', dir => 1 );
$file = searchpath( 'ls', $ENV{PATH} );
$exe = searchpath( 'ls' );
DESCRIPTION
This module provides the ability to search a path-like environment variable for a file (that does not necessarily have to be an
executable).
FUNCTIONS
The following functions can be exported by this module.
searchpath
This is the core function. The only mandatory argument is the name of a file to be located. The filename should not be absolute
although it can include directory specifications.
$path = searchpath( $file );
@matches = searchpath( $file );
If a second argument is provided, it is assumed to be a path like variable. This interface is provided for backwards compatibility with
"File::SearchPath" version 0.01. It is not as portable as specifying the name of the environment variable. Note also that no specific
attempt will be made to check whether the file is executable when the subroutine is called in this way.
$path = searchpath( $file, $ENV{PATH} );
By default, this will search in $PATH for executable files and is equivalent to:
$path = searchpath( $file, env => 'PATH', exe => 1 );
Hash-like options can be used to alter the behaviour of the search:
env Name of the environment variable to use as a starting point for the search. Should be a path-like environment variable such as
$PATH, $LD_LIBRARY_PATH etc. Defaults to $PATH. An error occurs if the environment variable is not set or not defined. If it is
defined but contains a blank string, the current directory will be assumed.
exe If true, only executable files will be located in the search path. If $PATH is being searched, the default is for this to be
true. For all other environment variables the default is false. If "dir" option is specified "exe" will always default to
false.
dir If true, only directories will be located in the search path. Default is false. "dir" and "exe" are not allowed to be true in
the same call. (triggering a croak() on error).
subdir If you know that your file is in a subdirectory of the path described by the environment variable, this direcotry can be
specified here. Alternatively, the path can be included in the file name itself.
In scalar context the first match is returned. In list context all matches are returned in the order corresponding to the directories
listed in the environment variable.
Returns undef (or empty list) if no match could be found.
If an absolute file name is provided, that filename is returned if it exists and is readable, else undef is returned.
HISTORY
"File::SearchPath" used to exist on CPAN (now on backpan) and was written by Robert Spier. This version is completely new but retains an
interface that is compatible with Robert's version. Thanks to Robert for allowing me to reuse this module name.
NOTES
If "Env::Path" module is installed it will be used. This allows for more flexibility than simply assuming colon-separated paths.
SEE ALSO
Env::Path, File::Which, File::Find, File::Find::Run, File::Where.
AUTHOR
Tim Jenness <t.jenness@jach.hawaii.edu>
Copyright (C) 2005,2006, 2008 Particle Physics and Astronomy Research Council. Copyright (C) 2009-2010 Science and Technology Facilities
Council. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place,Suite 330, Boston, MA 02111-1307, USA
perl v5.14.2 2012-03-28 File::SearchPath(3pm)