I have a script that allows the user to input the following:
EQUALS
CLEAR
PLUS
MINUS
OVER
TIMES
But I run the script then type PLUS 42, it actually makes the value 43.
Please help
#!/usr/bin/perl
use strict;
use warnings;
my $value;
print "\n> ";
while ( <> ) {
chomp;
if (...
Currently I'm using the script below only with TELNET instead of SSH and it works great. Trying to do the same type of thing with SSH, and can't seem to get it to login.
Please Help and newby out.
#!/usr/bin/ksh
# echo "Enter switch: \c"
# read switch
# echo "Enter username: \c"
# read...
I'm currently trying to learn PERL, and my instructor tasked me with the following and I'm kind of lost.
#!/usr/bin/perl
use strict;
use warnings;
# Grocery store inventory:
my $lines = <<'END_OF_REPORT';
0.95 300 White Peaches
1.45 120 California Avacados
5.50 10 Durian
0.40 700...
I have a KSH script that is working great on Solaris 10 Sparc, however I FTP this script to a different machine running Solaris 9, and now the #.LIVE.txt output is garbage when viewing from Web Browser. The original file shows fine, so it seems to be an issue with my Tail +15. I'm so confused...
Here is my script. However it doesn't seem to capture any data. I tried the same script without the grep and it still doesn't seem to capture anything. I assume it doesn't like the - and the |. Please help.
#!/usr/bin/ksh
# echo "Enter switch: \c"
# read switch
# echo "Enter username: \c"
#...
I have logs being captured to a file. The log format is the same for all of them. In the below example the ALL_SAME,B,C,D, and E are the fields I want to parse, however the fields B,C,D, and E are not always the same. Could someone please point me in the right direction on what would be the...
I'm fairly new to unix so please bear with me.
I have several log files that I need to extract certain lines from and output to another file.
I apologize for the crude example:
Bob
Jim
Joe
Ralph
Steve
George
I only want to extract Lines 3 through 5 and pipe to a file.
Could someone please...
I'm running the following on multiple files in a directory, and. It works fine, however I would like the most recent file be at the top and the oldest at the bottom. Is this possible ?
grep "Test" /export/home/test/market1* > /export/home/test_history/market1.HIS.txt...
I have hundreds of files that I need to rename or remove the : from. Any help would be appreciated.
Carsandtrucks.LOG_111709_14:41
Want all the files to look like this:
Carsandtrucks.LOG_111709_1441
Just need to remove the :
Please Help.
I'm trying to write a script on Machine A that logs into Machine B that is rotating log files every half hour. So what I want to do is pull the latest file based on the date.
cd /temp
file_20091027130000
file_20091027133000
file_20091027140000
file_20091027143000
So at 13:15 I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.