06-02-2012
Cool. I did not know ? Was a sequence. I guess you learn something new every other day.
Thanks, I will it and revert.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on one line then parse data on the next or subsequent lines - I will know which line needs to be parsed beforehand.
This is what I currently have:
while (<COMMAND_OUT>) {
if ($_ =~ m/TEST/) {
... (4 Replies)
Discussion started by: pondlife
4 Replies
2. Shell Programming and Scripting
Hi all
I have a problem which requires me to produce a line output in a specified format. I have looked around and see that there is typeset which would do the trick to pad a variable and as such ensure that its start position in a line is always the same.
I have tried to use this, however it... (4 Replies)
Discussion started by: jhansrod
4 Replies
3. Shell Programming and Scripting
Dear Friends,
I am beginner in Perl and trying to find the problem in a script. Kindly help me to modify the script. My script is not giving the output for the last field and followed text (LA: Language English). Input file & script as follows:
Input file:
Thu Mar 19 2:34:14 EDT 2009
STC... (3 Replies)
Discussion started by: srsahu75
3 Replies
4. Shell Programming and Scripting
Dear all
anyone willling to help me..i have try so many time but still failed to get the ip address for line
when i print the line is like below
Connected to 192.168.1.13
#!/usr/local/bin/perl
foreach $line(@lines){
if ($line =~ /connected to/) {
$line=~/connected to(.*?) /;
... (2 Replies)
Discussion started by: netxus
2 Replies
5. Shell Programming and Scripting
Hello,
I used the following script to conect to cisco router:
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use Opsware::NAS::Connect;
my($host, $port, $user, $pass) = ('localhost','$tc_proxy_telnet_port$','$tc_user_username$','$tc_user_password$');
my $device =... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies
6. Shell Programming and Scripting
I need to arrange output of SQL query into a comma separated format and I'm struggling with processing the output...
The output is something like this:
<Attribute1 name><x amount of white spaces><Atribute value>
<Attribute2 name><x amount of white spaces><Atribute value>
<Attribute3... (2 Replies)
Discussion started by: Juha
2 Replies
7. Shell Programming and Scripting
hi,
i have the followiing scenario where by i am parsing teh following output using cut -d
like so
#!/bin/bash
output="ABCTable|
------------------|
|
------------------|
code |
name |
amount |"
col1= $output | cut -d'|' -f5
col2= $output | cut -d'|'... (1 Reply)
Discussion started by: nano2
1 Replies
8. Shell Programming and Scripting
Below is a sample out of ls -l which I would like to rearrange or modify by field numbers for example I successfully managed to disect using simple paragraph however for ls -l I can't divide the rows or fields by field number.
Successful modification by fields using SED sample:
$ sed -e... (1 Reply)
Discussion started by: wolf@=NK
1 Replies
9. Solaris
anyone have any idea how do to this with auth_attr?
I suspect if I grant him
solaris.device.:RO::Device Allocation::help=DevAllocHeader.html
that will work but I'm unsure. Just looking for a second opinion. (10 Replies)
Discussion started by: os2mac
10 Replies
10. Shell Programming and Scripting
My source file looks like this:
Cust-Number = "101"
Cust-Name="Joe"
Cust-Town="London"
Cust-hobby="tennis"
Cust-purchase="200"
Cust-Number = "102"
Cust-Name="Mary"
Cust-Town="Newyork"
Cust-hobby="reading"
Cust-purchase="125"
Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies