I'm adapting a BASH script to run with an absolute minimal amounts of Cygwin64 files so colleagues using Windows can use it without installing Cygwin.
I am down to the following in /bin only (replacing cut with parameter substitution eliminated all needed things in /etc)
Any low handing fruit? No need to write the code for me just point me in the right direction.
Mike
---------- Post updated at 02:59 PM ---------- Previous update was at 02:44 PM ----------
Update: looks like find is (sometimes?) needing something in /etc as well (cant be all the time or I could not have been able to test cut). Any trick to find out what other than trial and error (what I used so far)?
Mike
Last edited by Michael Stora; 05-29-2015 at 08:43 PM..
I have just found out that a project I have developed in ASP (ultradev) needs to be migrated to a unix server and won't be able to support asp. Can anyone point me in the right direction to see what my options are with Unix? I have never worked with or developed for a Unix box before.
Also,... (3 Replies)
Hi,
I need to develop timeout functionality in my code, which is not affected by system's time changes.Unfortunately I dont have CLOCK_MONOTONIC support in my OS.
Are there any alternatives? (3 Replies)
I have a text file that contains 4 million lines, each line contains 2 fields(colon as field separator). as shown:
123:444,555,666,777,888,345
233:5444,555,666,777,888,345
623:454,585,664,773,888,345
......
Here I have to split the second field(can be up to 40,000 fields) by comma into an... (14 Replies)
I am looking for an alternative for sudo in linux, where i need not type the password.
OR is there any other version of 'growisofs', which can be executed under sudo??? As currently 'growisofs' refuses to start under sudo...
Thanks in advance (12 Replies)
Hi,
In unix ls command is found in /bin/ls. Similarly where can I find built-in commands like read, set, unset commands. I found in some couple of websites saying found in bash tool set. In unix everything is considered as a type of file with path.
Please can anyone tell me where is that Bash... (5 Replies)
I have a list of items (control file) that I want to substitute in a text file, and it's BIG.
The file has two items, the original, and the new:
A B
B C
D E
The file has something like 10,000 entries.
So in the oldfile.txt, I'd like to basically make all these expression matched... (9 Replies)
Hi,
I am using SSH to execute unix commands on remote machines. But, SSH will be diabled soon and I am looking for other alternatives to execute remote scripts/commands, without SSH . any suggestions or workarounds with out SSH for remote program executions ?
Thanks in advance. (4 Replies)
Hi is there an alternative other than the find command to get the size of files which are 10 days older ? I already use a script with find command
find . -mtime +10.
However would want to have an alternative script to find the size of files which are over 10 days.
Let me know if you... (1 Reply)
I'm attempting to emulate another users .zshrc file. However, I'm sort of confused on what exactly the -g argument does for the typeset builtin. Here's what he has in his .zshrc file:
typeset -ga sources
sources+="$ZSH_CONFIG/environment.zsh"
sources+="$ZSH_CONFIG/options.zsh"... (4 Replies)
Discussion started by: brandontdr
4 Replies
LEARN ABOUT REDHAT
file::dosglob
File::DosGlob(3pm) Perl Programmers Reference Guide File::DosGlob(3pm)NAME
File::DosGlob - DOS like globbing and then some
SYNOPSIS
require 5.004;
# override CORE::glob in current package
use File::DosGlob 'glob';
# override CORE::glob in ALL packages (use with extreme caution!)
use File::DosGlob 'GLOBAL_glob';
@perlfiles = glob "..\pe?l/*.p?";
print <..\pe?l/*.p?>;
# from the command line (overrides only in main::)
> perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"
DESCRIPTION
A module that implements DOS-like globbing with a few enhancements. It is largely compatible with perlglob.exe (the M$ setargv.obj ver-
sion) in all but one respect--it understands wildcards in directory components.
For example, "<..\l*b\file/*glob.p?"> will work as expected (in that it will find something like '..libFile/DosGlob.pm' alright). Note
that all path components are case-insensitive, and that backslashes and forward slashes are both accepted, and preserved. You may have to
double the backslashes if you are putting them in literally, due to double-quotish parsing of the pattern by perl.
Spaces in the argument delimit distinct patterns, so "glob('*.exe *.dll')" globs all filenames that end in ".exe" or ".dll". If you want
to put in literal spaces in the glob pattern, you can escape them with either double quotes, or backslashes. e.g. "glob('c:/"Program
Files"/*/*.dll')", or "glob('c:/Program Files/*/*.dll')". The argument is tokenized using "Text::ParseWords::parse_line()", so see
Text::ParseWords for details of the quoting rules used.
Extending it to csh patterns is left as an exercise to the reader.
NOTES
o Mac OS (Classic) users should note a few differences. The specification of pathnames in glob patterns adheres to the usual Mac OS con-
ventions: The path separator is a colon ':', not a slash '/' or backslash ''. A full path always begins with a volume name. A relative
pathname on Mac OS must always begin with a ':', except when specifying a file or directory name in the current working directory,
where the leading colon is optional. If specifying a volume name only, a trailing ':' is required. Due to these rules, a glob like <*:>
will find all mounted volumes, while a glob like <*> or <:*> will find all files and directories in the current directory.
Note that updirs in the glob pattern are resolved before the matching begins, i.e. a pattern like "*HD:t?p::a*" will be matched as
"*HD:a*". Note also, that a single trailing ':' in the pattern is ignored (unless it's a volume name pattern like "*HD:"), i.e. a glob
like <:*:> will find both directories and files (and not, as one might expect, only directories).
The metachars '*', '?' and the escape char '' are valid characters in volume, directory and file names on Mac OS. Hence, if you want
to match a '*', '?' or '' literally, you have to escape these characters. Due to perl's quoting rules, things may get a bit compli-
cated, when you want to match a string like '*' literally, or when you want to match '' literally, but treat the immediately follow-
ing character '*' as metachar. So, here's a rule of thumb (applies to both single- and double-quoted strings): escape each '*' or '?'
or '' with a backslash, if you want to treat them literally, and then double each backslash and your are done. E.g.
- Match '*' literally
escape both '' and '*' : '\*'
double the backslashes : '\\\*'
(Internally, the glob routine sees a '\*', which means that both '' and '*' are escaped.)
- Match '' literally, treat '*' as metachar
escape '' but not '*' : '\*'
double the backslashes : '\\*'
(Internally, the glob routine sees a '\*', which means that '' is escaped and '*' is not.)
Note that you also have to quote literal spaces in the glob pattern, as described above.
EXPORTS (by request only)
glob()
BUGS
Should probably be built into the core, and needs to stop pandering to DOS habits. Needs a dose of optimizium too.
AUTHOR
Gurusamy Sarathy <gsar@activestate.com>
HISTORY
o Support for globally overriding glob() (GSAR 3-JUN-98)
o Scalar context, independent iterator context fixes (GSAR 15-SEP-97)
o A few dir-vs-file optimizations result in glob importation being 10 times faster than using perlglob.exe, and using perlglob.bat is
only twice as slow as perlglob.exe (GSAR 28-MAY-97)
o Several cleanups prompted by lack of compatible perlglob.exe under Borland (GSAR 27-MAY-97)
o Initial version (GSAR 20-FEB-97)
SEE ALSO
perl
perlglob.bat
Text::ParseWords
perl v5.8.0 2002-06-01 File::DosGlob(3pm)