How can I nest substitutions ? My solution just seems cheap ...
sample data
Cisco Catalyst Operating System Software, Version 235.5(18)
Cisco Catalyst Operating System Software, Version 17.6(7)
Cisco Catalyst Operating System Software, Version 19.6(7)
Cisco Catalyst Operating System Software, Version 6.4(11)
Cisco Catalyst Operating System Software, Version 8.3(7)
Cisco Catalyst Operating System Software, Version 7.6(7)
Cisco Catalyst Operating System Software, Version 5.5(11)
Cisco Catalyst Operating System Software, Version 5.5(10)
SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(8), RELEASE SOFTWARE (fc1)
we have a CSV which i need to convert to XML using Perl or Unix shell scripting.
I was able to build this XML in oracle database. However, SQL/XML query is running for long time. Hence, I'm considering to write a Perl or shell script to generate this XML file. Basically need to build this XML... (3 Replies)
Hi all,
I have a lookup table from which I am looking up values (from col1) and replacing them by corresponding values (from col2) in another file.
lookup file
a,b
c,d
So just replace a by b, and replace c by d.
mainfile
a,fvvgeggsegg,dvs
a,fgeggefddddddddddg... (7 Replies)
Hello
How can write the nested command substitutions?
echo `expr substr $x 1 expr ${#x} - 1`
the above code is not working!
Thanks in advance
Regards
Chetanz (5 Replies)
PHOST1=temp
i=1
I want to display the value of PHOST1 by making use of variable i inplace of 1
something like this
echo "$PHOST$i" # -> This doesn't seem to work.
Please provide me the correct syntax. I tried many different ways
echo ${PHOST${i}}
echo ${PHOST
Nothing seems... (6 Replies)
Hello,
I'm quite new to perl so my question is rather basic and I know there is probably a simple way around it but I can't seem to find it.
I have a medium-length code and there is a part that works with a nested for loop:
foreach my $j(@primpiddelta){
for (my $k=1;... (0 Replies)
I'm just having a bit of trouble running this code. It tells me that there's a syntax error on line 29. Any help appreciated.
#!/usr/bin/perl
#
# Phone Book Application
#
%phonebook = (
"Wayne", '34687368',
"Home", '378643287',
"Work", '017374637',
"School",... (2 Replies)
I am working on a bash script and ran around this issue. here's the code :
#!/bin/bash
string="\"bin\" \"barn\" \"bin, barn /\""
array=($string)
echo -e "\nMethod 1\narray is ---> ${array}"
echo -e "array=($string)"
array=("bin" "barn" "bin, barn /")
echo -e "\nMethod 2\narray is... (4 Replies)
Is there anyway to accomplish this?
(ksh)
FILES_TO_PROCESS='NAME1 NAME2'
SOURCE_NAME1=/tmp/myfile
TARGET_NAME1=/somewhere/else
# other file names
for i in $FILES_TO_PROCESS
do
file1=SOURCE_$i
file2=TARGET_$i
echo cp ${$file1} ${$file2} <-- how do get this to work.
done (2 Replies)
I have a array reference which has some number of array references inside it.The nested array references also contains the array references.
my $Filename = "sample.xml";
my $Parser = new XML::Parser( Style => 'tree' );
my $Tree = $Parser->parsefile( $Filename );
Here the $Tree is the... (6 Replies)
I have two arrays
@nextArray contains some files like
\main\1\Xul.xml@@\main\galileo_integration_sjc\0
\main\1\PortToStorageDialog.xml@@\main\galileo_integration_sjc\0
.
.
.
\main\1\PreferencesDialog.xml@@\main\galileo_integration_sjc\0
@otherArray contains some files like
... (2 Replies)