Search Results

Search: Posts Made By: nurani
2,039
Posted By nurani
Formatting
Hi,

I can't use align. I did try to use it and I got bunch of errors. Due to lack of time, I would like go with printf.

Is there a way I can pad spaces using printf command.

My existing...
2,039
Posted By nurani
It worked
Hi,

I implemented the chomp command and it worked. But as a follow up to that, If I want to space out the numbers nicely underneath the headings, what do I do for that.

Rightnow the numbers...
2,039
Posted By nurani
Formatting Perl Output
Hi,

I am getting the output from a PERL program but the output is all on different lines.

My code is
printf hOUT "%s\t%s\t%s\t%s\t%s\t%s",$M1_CTR, $M2_CTR, $M3_CTR, $M4_CTR, $M5_CTR,...
2,285
Posted By nurani
awk with printf
Yes... On the command line when I run the whole grep command including the awk, I get just the number.

That's what is frustrating. Thinking that a command line command would
work when I code the...
2,285
Posted By nurani
awk with printf
Hi,

I am using the following code to assign a count value to a variable. But I get nothing. Do you see anything wrong here.

I am new to all this.


$CTR=`remsh $m -l $MACHINES{$m} -n cat...
1,338
Posted By nurani
No luck yet
Hi,

I tried the command you suggested, but I still get more references than
the phrase Iam looking for.

Eg: - I am looking for "Number of orders processed"

I get

Number of orders...
1,338
Posted By nurani
My Requirement
Hi,

My $input which is the search string I am trying to find in the file which is
refered by $ output.

Also, Iam using this in a PERL program. I gave the backtick so PERL wouldn't pick it...
1,338
Posted By nurani
Shell Scripting
Hi,

Tried your suggestion. No Luck.

I also tried grep -w option and that didn't work.

I am googling "Grep a Phrase" to get some more ideas. The command I am trying run through the program...
1,338
Posted By nurani
Shell Scripting
Hi,

I have couple of issues with shell scripting that I am unable to resolve

1) I am doing a grep using a remsh command. Here is the actual command.


$CTR = `remsh $m -l...
28,937
Posted By nurani
grep can't open error ----- Continues
Hi,

I have tried everything that has been suggested, but to no avail. Let me explain exactly what I am doing. (Or what I want the script to do)

1) I run my script in machine A
2) I need to...
28,937
Posted By nurani
grep can't open error ----- Continues
Hi,

If I understand you right....You wanted me to give the full path to the file rather than just the file name. But no luck.

Any other ideas or things that might cause this.

I am new to...
1,681
Posted By nurani
How to get previous date
Hello,

Apologies for not following the forum rules. I will follow it from now on.

What I need now is to get the previous date in PERL.

Today is 07/01/2010...and the prev date is...
28,937
Posted By nurani
grep can't open error ----- Continues
Sorry,

I was trying on 1 box to make it work. I copied the wrong code.

I do have the $output as you mentioned.

$CTR=`grep "Number of orders processed:" $output | sort -u | awk '{print...
28,937
Posted By nurani
grep can't open error ----- Continues
Hi,

Thanks for the code. I put that in and now my $output has the file name I need to grep.

Yet, "grep can't open error" shows up

This is what I added within the loop.

@a=split...
28,937
Posted By nurani
Split file name from relative path
Ok,

The issue seems to be that my $output comes like this (whole path)

-rw-rw-r-- 1 user3 box1 99999 Jun 29 12.00 /abc/def/xyz/filename

How do I just strip the "filename" from above....
28,937
Posted By nurani
grep can't open error
Hi,

Thanks for all your help. This forum is excellent. I just learnt PERL over the last few weeks by coding and asking questions....

I have one more.

When I run my script I get the...
1,620
Posted By nurani
rlogin in PERL
Hi,

What I would like to do is use "rlogin" to access a remote server and grep a file for some information?

So, In PERL, I have the following Hash defined.

%box = ('box1' => 'rem1',...
1,645
Posted By nurani
Remote Login error in Perl
Hi,


This is in PERL.

I am trying to remotely login to a server to access and grep a log file.

This is what I have defined in my Hash

%servers = ('box1' => 'userid1', 'box2' =>...
2,050
Posted By nurani
Thanks for the reply
I tried it and it works.
2,050
Posted By nurani
Dereferencing in PERL
Hi,

This should be a simple one.

All I am doing is adding an email address to my email.

Example abc@xyz.com

I understand that the @ means arrays in PERL. So, I coded the backtick...
9,485
Posted By nurani
Date and Time in PERL
Hi,

I want to get the current date and time and subtract 1 day to get to the
previous day?

I see timelocal( ) and (time) etc.

How do I code this in PERL to get the previous day?
...
6,925
Posted By nurani
How to append records to a file using PERL
Hi All,

Great Forum and Great help. Keep up the good work.

My question is what is the command and it's syntax to append a record to an output file using PERL. Please provide the command...
9,465
Posted By nurani
PERL Syntax Errors
Hi,

I am a newbie to PERL and working on a script. When running it I get a lot of compilation errors.

The actual command in the program (which is within a case structure) is given below
...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 06:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy