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 votes
3 answers
90 views

Delete 2-line paragraphs, keep 3-line paragraphs, maintain newline between all

On a Linux machine with GNU tools I have an ascii file that consists of only 2-line and 3-line paragraphs, each paragraph separated by a newline. All 2-line paragraphs are to be deleted so that all 3-...
1 vote
0 answers
17 views

Problem enabling perl module stream AlmaLinux 8.10

I have an issue with our AlmaLinux 8.10 systems that they suddenly have issues with perl dependancies. It tuns out that the current active perl stream is 5.26 (dnf module list perl*) but some packages ...
0 votes
1 answer
44 views

version `XCRYPT_2.0' not found after Update Debian 10 to Debian 12

I was instructed to upgrade Debian 10 to Debian 12. After the upgrade, I noticed that the ssh.service was not working. Now I found out that no 'apt' commands work. I can't install anything. Here the ...
0 votes
1 answer
3k views

How to submit multiple commands as one liner in netbatch nbq commmand line

Can someone tell how to submit a one liner command using nbq command line? Submitted multiple commands in Linux works fine but not in nbq mode as below. find /nfs/disks/test_dir/ -name .snapshot -...
0 votes
1 answer
40 views

What does the line ($eachJOBID = $eachScriptNoPath) =~ s/\.csh// ; do?

This line I have in my code cuts the .csh from a string and returns the rest of it. Can someone explain what each part of it does? ($eachJOBID = $eachScriptNoPath) =~ s/\.csh// ;
16 votes
5 answers
1k views

How can UserA programmatically replace a text string within a file they own that's located in /etc?

A non-root linux user owns a text file that's located in /etc, where the non-root linux user does not have permission to create files. The non-root linux user can edit the file manually via vi without ...
1 vote
3 answers
73 views

Bash: sum a number present in N lines before a given pattern

I have a kdenlive project file (which is basically a xml file) with a lot of text clips inside. I need to bulk edit the x coordinate of a certain text that appears multiple times. This is an example: ...
36 votes
9 answers
84k views

How to delete the last column of a file in Linux

I want to delete the last column of a txt file, while I do not know what the column number is. How could I do this? Example: Input: 1223 1234 1323 ... 2222 123 1233 1234 1233 ... 3444 125 0000 5553 ...
5 votes
1 answer
17k views

perl: warning: Setting locale failed

I bought a VPS, Centos 7. However, I was able to understand what was going on with SSH and connected to my WHM. After connecting, I get a list of errors and there is something like this: perl: ...
3 votes
1 answer
472 views

Why is one process ps command showing spaces around a directory instead of slashes?

I'm trying to debug a failing legacy process monitor that searches processes that are running. I determined it is being caused by some mysterious linux behavior. The process being ran is /opt/my/path/...
0 votes
2 answers
5k views

Convert perl script to bash

The following script it's about monitoring some logs, the $timestamp is at log at every line that something happens. Example: 03:19:13.4 Begin summary update for ads.doc.inventory....
0 votes
2 answers
2k views

Need to pass arguments in adcfgclone.pl script

I just wanted to know is there any way to pass the arguments in perl script (adcfgclone.pl) during compilation time (i.e., the values should not be asked during script run time) Below is an example ...
-1 votes
4 answers
2k views

How to split columns of a CSV file into separate files?

I have csv file namely list.csv as shown below, Pcissicola19,cissicola39,12xbauhiniae BGDHLHFA_02833,DGDFDEGP_00879,POPGJMOL_04119 BGDHLHFA_01427,DGDFDEGP_03106,POPGJMOL_01558 BGDHLHFA_01618,...
1 vote
1 answer
2k views

Downgrade Perl Version 5.16.3 on RedHat 7 to 5.10.1

I'm making a migration of my monitoring application from a redhat 6 server to a redhat 7 server. There are perl plugins I have on the redhat 6 server that work. But when migrated to redhat 7, they ...
965 votes
10 answers
1.8m views

How can I replace a string in a file(s)?

Replacing strings in files based on certain search criteria is a very common task. How can I replace string foo with bar in all files in the current directory? do the same recursively for sub ...

15 30 50 per page
1
2 3 4 5
91