Skip to main content

Questions tagged [perl]

Perl is a high-level, general-purpose, interpreted, dynamic programming language. It was originally developed by Larry Wall as a general-purpose Unix scripting language to make report processing easier, over a period with support from open source community, it has evolved and matured to be used for graphics programming, system administration, network programming, finance, bioinformatics, and other engineering applications.

1 vote
1 answer
151 views

How can I condense several regex to a one-liner?

I'm having trouble condensing several regex down to an efficient one-liner. I have file names which are named like this: Something (0482) - a123b456 - Something [00xcf bxc v32 Something]. I'd like the ...
telometto's user avatar
  • 2,055
0 votes
1 answer
108 views

clusterssh: prevent windows being arranged alphabetically

I am using cssh on Debian 10 (package clusterssh 4.13.2-2). when I connect to multiple servers: cssh foo bar zz aa cssh will open 4 terminals and ORDERS THEM ALPHABETICALLY !!! So that I get the ...
Martin Vegter's user avatar
1 vote
3 answers
147 views

Detect leaf directories in Perl

For a Perl script I'm working on, I'm looking for a fast and reliable way to find all subdirectories (transitively) of a given directory which are leaves, i.e. those not having any subdirectories of ...
q.undertow's user avatar
5 votes
5 answers
780 views

How can I replace multiple substrings from multiple lines in a file matching a pattern from a different file?

I have a file that contains multiple IP addresses and hostnames, and another file that contains some folders with many IP addresses per line. ip_hostname.txt host1 10.1.1.1 host2 10.2.2.2 host3 10.3.3....
Outsider's user avatar
1 vote
1 answer
47 views

"Total In-/Out- coming connection awareness" - script?

once I had found a bash (or Perl maybe; it's so long ago, that I wasn't knowledgeable about bash enough to tell one set of hieroglyphs from another set so to speak) script that filtered the open files ...
von spotz's user avatar
  • 435
1 vote
3 answers
384 views

Filter git log of pom.xml using regex with grep/perl

I'd like to filter the content of a log of a pom.xml file using a regex. I created it on regexr and it works using PCRE; this is my regex: commit \K[a-z0-9]*(?=[\s\S]*\+.*<version>1.2.0) I then ...
gscaparrotti's user avatar
0 votes
0 answers
514 views

base64 decode as save as multiple files

I have a file(har file saved from web developer" that contains the base64 encoded value of multiple video*.ts files. I am interested to decode the base64 part and save as multiple ts files if the ...
maneesh murali's user avatar
2 votes
1 answer
644 views

How do you modify the RPM spec file to require perl libraries on centos 7?

I normally start with a Minimal Centos 7 and run yum install perl-libs.x86_64 This works perfectly. I am now trying to create an RPM spec file that uses the "Requires" clause to package ...
user1068636's user avatar
1 vote
1 answer
230 views

Why does Debian package Scalar::Util in libperl and perl-base?

I was just checking something out on Debian, when I use apt-file to search for Scalar/Util.pm a CORE Perl module I see three results, $ apt-file search Scalar/Util.pm libperl5.34: /usr/lib/x86_64-...
Evan Carroll's user avatar
  • 31.8k
1 vote
0 answers
456 views

how to validate Perl Modules Installed in Ubuntu

I have a list of Perl Modules which needs to be installed on a new server . List of Perl Modules is like this perl-Expect perl-JSON perl-Net-OpenSSH perl-Test-Most perl-DBD-Mock Earlier we were ...
Developer's user avatar
  • 237
1 vote
1 answer
747 views

Perl @INC Path Help

I got handed over a Perl script which fails to run because the path to the Perl is deleted. How can I modify the path such that I can point it to /opt/perl/lib/5.28.2 Any help will really be ...
Rituraj's user avatar
  • 333
3 votes
2 answers
282 views

Find regex occurrances on block device (line length buffer issue)

I'm trying to find all numbers on two block devices that start with a # character, are between 1635700000 and 1653699999, and end either with a null character (\0) or a linux newline (\0xA). I came up ...
user1902689's user avatar
  • 1,218
1 vote
2 answers
222 views

Remove all characters from string, except specific multibyte range

How would one use sed or another tool to remove all characters except a specific multibyte range? For instance, the range \xd8\xa0 - \xd9\x8a covers Arabic characters encoded in UTF-8. This was my ...
dotancohen's user avatar
  • 16.1k
0 votes
8 answers
1k views

Rewriting log parsing script in Perl or Python (get rid of awk)

I need accomplish a task of filtering activity of bots in the log file. Solution should only show records meeting following criteria user logged in, user changed password, user logged off within ...
Twissell's user avatar
  • 141
3 votes
3 answers
967 views

Conditional replacement using perl

Very simple hypothetical question, I've reached the limitation of sed and need to change my sed script to perl. So for sed conditional replacement of sed '/condition/ s/xx/yy/' How to do it in perl? ...
xpt's user avatar
  • 1,644

15 30 50 per page
1
3 4
5
6 7
91