0
votes
2answers
37 views

return two values from perl to bash variables

I am calling a perl script to calculate size and variation in bash script. Is there a way to return those two values to separated variables in bash, say $SIZE and $VAR. Only know how to return one ...
3
votes
10answers
136 views

Merge/Discard overlapping words

I want to merge strings (words) that are similar (string is within other string). word wor words wormhole hole Would make: words wormhole As wor overlaps with: word, words, ...
2
votes
0answers
82 views

Prediction analysis (Time series model) in UNIX

I know its not a code level question but wanted your views. I need to perform “Prediction Analysis” in UNIX level using Time series model (like ARIMA). We have implemented the same using R , but my ...
1
vote
2answers
69 views

How to separate different values and make them variables

Want to separate different values and make them variables: db2 Attempting to contact (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=server1)(PORT=1521))) ...
2
votes
2answers
57 views

Making an output buffer return more readable/maintainable

I'm new to Perl, but I would like to make the following return more readable. I have no choice but to maintain this old code. I've read in places to never use both qx and $_ I was thinking of storing ...
4
votes
3answers
73 views

Loop - Extract text for record until the next record

My dummy file looks like this: >Tom text text text, year = 16 text text text Grades . . . . 10 Grades . . . . 9 >Ann text text text, year = 17 text Grades . . . ...
3
votes
1answer
74 views

Bash script to tail -f with colored lines

I tried to create a script from this suggestion like this : #!/bin/bash if [ $# -eq 0 ]; then tail -f /var/log/mylog.log fi if [ $# -eq 1 ]; then tail -f /var/log/mylog.log | perl ...
0
votes
1answer
30 views

Bash error in perl script using HTML::Scrubber

USER:~/Directory>curl http://www.w3schools.com/html/html_tables.asp | html.parser2.pl Can't locate HTML/Scrubber.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 ...
-1
votes
1answer
86 views

Reading a file line-by-line fork/exec - Perl

Currently I'm attempting to read a file line by line and fork processes using perl Basically my perl script "test.pl" executes another script using exec the way it should work is the script "run.sh" ...
4
votes
5answers
103 views

Grep numbers between colon and comma

I want to grep all results which contain over 70 percent of usage Example of output: {"ipaddr":"1.1.1.1","hostname":"host1.test.com","percentage":69,"dir":"/root"}, ...
6
votes
5answers
84 views

Any way to find if two adjacent new lines start with certain words?

Say I have a file like so: +jaklfjdskalfjkdsaj fkldsjafkljdkaljfsd -jslakflkdsalfkdls; +sdjafkdjsakfjdskal I only want to find and count the amount of times during this file a line that starts with ...
0
votes
3answers
78 views

generating a bash script

How do I use Perl to create another file known as hello.sh? I tried: #*perl codes* #Before this has perl's section of codes #Now want to create shell script open FILE , ">hello.sh" or die $!; ...
2
votes
2answers
45 views

Find available space in /tmp on a remote machine

I want to find out the available space in /tmp on a remote machine. I can do it with the following command from my machine: ssh host-name df /tmp | awk '{ print $4 }' | tail +2` IT works and gives ...
0
votes
5answers
78 views

Way to get time string in mixed columns

Way to get time string in these mixed columns: new1 new11 1.1.1.1 application id1223 831582 start 09:21:12 05/24/2013 -- -- new1 new11 1.1.1.1 application ...
2
votes
4answers
87 views

How do you remove unused arguments for shell command run in perl?

My script gets a bunch of values for various arguments from a text file and puts them into variables. Then, the following line is run to execute a shell command with the various options: cmd -a $a ...

1 2 3 4 5 36
15 30 50 per page