09-08-2018
6 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can someone please clarify how we are able to use both IO and GLOB symbols of a package variable interchangeably?
Please consider the following code:
open(FH,"myfile") || die "Unable to open file myfile:$@";
my $glob_var = *main::FH{GLOB};
my $io_var = *main::FH{IO};
print $glob_var... (0 Replies)
Discussion started by: srinivasan_85
0 Replies
2. Shell Programming and Scripting
I encountered a weird issue with globbing in perl not returning all files, while I was testing out a script for recursive dir-processing on my Synology NAS.
Basically it didn't show (/match?) all the files in a specific directory. If I move the file to a different directory or even rename it, it... (2 Replies)
Discussion started by: odyssey
2 Replies
3. Shell Programming and Scripting
If you have a look at this thread, you'll see that users have been posting the output a script which are numbers that range from 2 to 5 decimal places. If I dump this entire thread to txt file, how can I:
1) Delete everything except for numbers of the following formats (where 'x' is a digit and... (5 Replies)
Discussion started by: graysky
5 Replies
4. Shell Programming and Scripting
Hi
I Have a directory and i have some files below
abc.txt
abc.gif
gtee.txt
ghod.pid
umni.log
unmi.tar
How can use glob function to grep abc files , i have created a variable "text" and i assigned value as "abc", please suggest me how can we use glob.glob( ) to get the output as below... (2 Replies)
Discussion started by: kumar85shiv
2 Replies
5. Shell Programming and Scripting
Hi
I need some suggestion on glob function.
I am trying to write a python program to grep some specific files in a particular directory.
In the directory i have some files like below
abc.log
abc.pid
abc.tar
gadd.tar
gat.log
gat.tar
in this directory i need to grep onlu my hostname files,... (1 Reply)
Discussion started by: kumar85shiv
1 Replies
6. Shell Programming and Scripting
Hello All,
I have created a script that searches for different things and "sanitizes" the findings from files. Currently the user is required to put in a hostname (server.serverfarm.abc) one at a time to replace. I would like the user be able to use *.*.abc in grep and then pipe into sed to... (1 Reply)
Discussion started by: jvezinat
1 Replies
glob.h(3HEAD) Headers glob.h(3HEAD)
NAME
glob.h, glob - pathname pattern-matching types
SYNOPSIS
#include <glob.h>
DESCRIPTION
The <glob.h> header defines the structures and symbolic constants used by the glob(3C).
The structure type glob_t contains the following members:
size_t gl_pathc /* count of paths matched by pattern */
char **gl_pathv /* pointer to a list of matched pathnames */
size_t gl_offs /* lots to reserve at the beginning of gl_pathv */
The following constants are provided as values for the flags argument:
GLOB_APPEND Append generated pathnames to those previously obtained.
GLOB_DOOFFS Specify how many null pointers to add to the beginning of gl_pathv.
GLOB_ERR Cause glob() to return on error.
GLOB_MARK Each pathname that is a directory that matches pattern has a slash appended.
GLOB_NOCHECK If pattern does not match any pathname, then return a list consisting of only pattern.
GLOB_NOESCAPE Disable backslash escaping.
GLOB_NOSORT Do not sort the pathnames returned.
The following constants are defined as error return values:
GLOB_ABORTED The scan was stopped because GLOB_ERR was set or (*errfunc)() returned non-zero.
GLOB_NOMATCH The pattern does not match any existing pathname, and GLOB_NOCHECK was not set in flags.
GLOB_NOSPACE An attempt to allocate memory failed.
GLOB_NOSYS Reserved.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
glob(3C), attributes(5), standards(5)
SunOS 5.10 10 Sep 2004 glob.h(3HEAD)