Tagged Questions
1
vote
1answer
42 views
Perl dependency issue
I've installed CentOS 6.3 (i386) recently.
It has two perl binary
/usr/bin/perl (v5.10.1)
/usr/local/appx/perl/bin/perl (v5.8.8)
My question: Is it possible to install some other funtinonality ...
-1
votes
3answers
65 views
Sorting IP address according to the second field in file
in my ksh script I need to add the following task ( OS - linux/solaris )
I have the following file
more test.txt
/etc/backup/app 172.1.120 172.110.120
/etc/backup/app 172.1.120.12 ...
0
votes
2answers
68 views
perl one liner + print VALUE in the end of the line
The following perl one liner checks if $CURRENT_VERSION matches $NEW_VERSION exactly, and prints it if it does.
Example:
CURRENT_VERSION=223.3.12.4.5.3
NEW_VERSION=223.3.12.4.5.3
DATE=17.3.2013
...
2
votes
1answer
84 views
perl + combine exec command with perl one liner line
I have the following short perl script rename.pl. How can I translate this script to one liner perl syntax? And how to combine the perl one liner in find command?
rename.pl
#!/usr/bin/perl
$op = ...
1
vote
2answers
78 views
renaming a directory and its subdirs without affecting their files
I have to rename directories under the root directory with prefix "ms_PF" and then rename their subdirectories with the modified name of the main directory with an extra "_", and then copy all ...
0
votes
1answer
236 views
Failed dependencies trying to install package 'libxml2'
I am trying to install libxml2, but my system complains about dependencies. The dependent packages exist on system.
The ultimate goal is to install xml_grep2, I have been trying various methods ...
2
votes
1answer
61 views
How to list all present optical drivers?
How can I list all the installed optical drivers with udev or any other core-based tool (perl is also very good) ?
P.S.: I know about the wodim --devices command, but it's an undesirable ...
1
vote
1answer
190 views
Identify text/ascii files in Linux/Solaris
I have a little project to build bash script that search in the OS ( Linux/Solaris ) the current IP address from files and replace them with other IP address.
The problem is that IP address could be ...
0
votes
1answer
395 views
Linux + replace STRING/WORD in file according to rule
My target is to replace any word/string/Any characters in file
with new word/string according to the following rules:
If numeric characters on the left side of word/string then we not replace the ...
0
votes
1answer
228 views
linux + perl + replace any WORD in file with special characters with condition
Example1 work fine when I want to replace OLD_TEXT with NEW_TEXT ( its replace also all special characters as $@^%)(_+`:; etc ..)
example1
export OLD_TEXT='$$OLD_WORD$$'
export ...
2
votes
4answers
326 views
Replace all but a set of characters in a file with newline
how to delete all characters in file except numbers and "." ,
each word (numbers/dot) should be in new line in file see example2
the solution can be with sed or awk or ksh syntax
remark - ...
1
vote
2answers
449 views
Fetch values from plist file on Linux
I have bash script which was written for OS X and now ported to Linux. I don't have access to the Linux box. The bash script would read values from plist files using the defaults read and PlistBuddy ...
8
votes
4answers
646 views
Why is Perl installed by default with most Linux distributions?
Just curious. The title says it all: Why is Perl installed by default with most Linux distributions?
-2
votes
3answers
157 views
how to check for disk in use on rhel
How to check if a disk is in use? If in use, How to check free, used space before I can start using it?
I'm trying this in Perl and Any help is appreciated.
-6
votes
1answer
160 views
Linux: create list of text with multiple operators [closed]
I want to make a list like this:
7785237_770x770_de3b540dc13ed50023d17854513b40aa07e50a6a
732308_770x770_ec5c344c0114011a5306b31142ff9b001813f6d6
...
3
votes
2answers
1k views
How to know reason of a process going to sleep state and wake it up?
When I do 'top' , I see my perl script process in 'S' state. Is there a way to know, what is making this perl process go in sleep state and ways to wake it up? Any way to debug to give more insights ...
0
votes
2answers
308 views
Need to install MySQL Client libaries but RPM not installing them
I'm trying install the MySQL Client libraries for the Perl Mod of the same name but when I run
sudo rpm --install -v --allfiles MySQL-client-5.5.16-1.linux2.6.i386.rpm
and querying the rpm ...
2
votes
2answers
187 views
perl regex replacing globally when global not selected
I'm using Ubuntu 11.04 and wrote a small script that searches within text files for certain "tokens" and replaces with some a prewritten snippet from a template file of the same name.
The text files ...
1
vote
1answer
490 views
Find server with small ping latency (my script, but can anyone write it in e.g.: Perl?) [closed]
I want to download OpenBSD with FTP with a script, and I want to download it from a server that is near me. So I want to choose a mirror that has low "ping latency". I wrote a little script, that ...
1
vote
2answers
234 views
Perl find and replace is writing every file
Here's the test script I'm running
matt@server:~ $ cat test.sh
#!/bin/bash
mkdir test
cd test
echo "has the string foo" > yes.txt
echo "hasn't the string" > no.txt
ls -l --time-style=full-iso
...