Code:
#include<stdlib.h>
#include <pthread.h>
#include "tlpi_hdr.h"
#include <stdio.h>
static volatile int glob = 0;
static struct {
pthread_t t1,t2;
} *thread;
static void * /* Loop 'arg' times incrementing 'glob' */
threadFunc(void *arg)
{
int loops = *((int *) arg);
int loc, j, s;
if (s != 0)
errExitEN(s, &quo
I'd like to write something like this:
$ ls **.py
in order to get all .py filenames, recursively walking a directory hierarchy.
Even if there are .py files to find, the shell (bash) gives this output:
ls: cannot access **.py: No such file or directory
Any way to do what I want?
EDIT: I'd like to specify that I'm not interested in the specific case of ls, but the question is about the glob
Code:
@scriptfiles=glob('*.txt');
foreach $file (glob('*.txt'))
{
open(my $fh, $file) or die("Unable to open '$file': $!");
while (my $line = <$fh>)
{
if ($line =~ m/(Apple|Orange|Guava)/i)
{
$Sheet->Cells($row,$col-1)-&
here's a very simple script:
[root@poker cgi-bin]# cat globtest.pl
!/usr/bin/perl -w
my $foo="/tmp/*";
my @glob=glob($foo);
my $size=scalar(@glob);
print "Content-type: text/html\n\n";
print "\n";
print "SIZE: $size\n";
print"\n";
when I run it from a URL on a RHEL5.3 system, it tells me how many files are in /tmp, but when I run it on a RHEL 6.2 box it reports 0.
what gives?
Hi All,
Below is the configuration of my sun cluster.
root@glob-one # clzc status
=== Zone Clusters ===
--- Zone Cluster Status ---
Name Node Name Zone HostName Status Zone Status
---- --------- ------------- ------ -----------
data glob-two local-zone2 Online Running
glob-one local-zone1 Online
Hi All,
Below is the configuration of my sun cluster.
root@glob-one # clzc status
=== Zone Clusters ===
--- Zone Cluster Status ---
Name Node Name Zone HostName Status Zone Status
---- --------- ------------- ------ -----------
data glob-two local-zone2 Online Running
glob-one local-zone1 Online
* Never use a regular expression when an extended glob will do. Never use an extended glob when a regular glob will do. Never use a glob when a string will do.
(greycat, 22 Nov 2010, Freenode IRC channel #bash)
* a lack of quotes is scary!!!
(go|dfish, 17 Dec 2010, Freenode IRC channel #bash)
* primarily, remember: that bash considers most things to be strings and is written in c.
I am trying to show all instances of a particular message from the syslog in chronological order by doing something like the following:
grep squiggle /var/log/messages*
Unfortunately the glob pattern matches the currently active file first.
Hi,
I have been spending hours trying to figure out why I can't telnet my mail server (Ubuntu Server 12.04) via port 443 remotely. I do have firewall in place using APF from R-fx networks. I'm pretty sure I have opened up Port 443.