Skip to content

Tag: perl

loadable library and perl binaries are mismatched

Can not run Pac-manager after installing deb file, Downloaded Pac Manger from : https://sourceforge.net/projects/pacmanager/ When run pac in the terminal , showing below problem xs/Vte.c: loadable library and perl binaries are mismatched (got handshake key 0xdb00080, needed 0xdb80080) System: Linux PC-pc 4.4.…

grep case-insensitively for a string in a text file

I’m writing a Perl script but I don’t get a part of it. There’s a text file with host names, one per line. I need to search a second file with host names (a blacklist) for the hostname read from the first one. To be sage the search should be done case insensitive. My first approach was using…

Hide Multiple Excel Worksheets

I am using the Perl module Excel::Writer::XLSX to write an Excel workbook in Linux. I am writing to three separate worksheets and am trying to hide the first two so that only the third worksheet is visible. Perl Code: Instead, using the code below, only the first worksheet tab is being hidden. What am I doing…

Serial Numbers from a Storage Controller over SSH

Background I’m working on a bash script to pull serial numbers and part numbers from all the devices in a server rack, my goal is to be able to run a single script (inventory.sh) and walk away while it generates text files containing the information I need. I’m using bash for maximum compatibility…

Facing issues writing code with perl expect

I want to run a command which will connect to a remote host and perform some actions, while I try to run the command below actions are required. also it asks for a password as below I have written a perl script as below: I needed a code which can answer the questions asked on console i.e. as below and

Executing an if else shell command from perl

I have never run into this scenario before so I could use a little help. I am trying to issue an if/else statement from a shell command but within perl. I’ve tried system and exec with no success. Here’s a sample of the code If I run the command if ! dpkg -l curl &> /dev/null; then apt-get …

Executing several commands at once [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago. Improve this question I am trying to write something in Perl (but I’m also happy with Python or PHP to do th…