10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Q 1. Write a shell script to print the following pattern upto n (specified by user)-
@
@@
@@@
@@@@
@@@
@@
@
Please help! :) (1 Reply)
Discussion started by: heatedline
1 Replies
2. Shell Programming and Scripting
Hi, guys, i have a script i inherited from a coworker but i'm not perl savy. The script works but i would like it to work better. I want to run this command
./ciscomgrtest.pl -r "show version" -h hosts.router
and have the script goto each router in the hosts.router file and run the command... (2 Replies)
Discussion started by: whipuras
2 Replies
3. Shell Programming and Scripting
Hi,
I have the following lines that I would like to see in an array for easy comparisons and printing:
Example 1:
field1,field2,field3,field4,field5
value1,value2,value3,value4,value5Example 2:
field1,field3,field4,field2,field5,field6,field7... (7 Replies)
Discussion started by: ejdv
7 Replies
4. Shell Programming and Scripting
Hi,
I want to count the number of occurences of a character in a string variable ($str). The character is stored in a another variable ($sepchr). I am using tr as :
$count = ($str =~ tr/$sepchr//);
This did not work. I found in another thread about using eval. I used eval as :
... (13 Replies)
Discussion started by: sinpeak
13 Replies
5. Shell Programming and Scripting
Hey all,
perl - how can we name a variable base on the value of another variable?
for example in ksh/bash we do :
export c="100"
export x`echo $c`=2000
echo $x100
x100=2000
is it possible to do something similar for perl?
I already tried many ways but nothing is working.
I am... (3 Replies)
Discussion started by: cacm1975
3 Replies
6. Shell Programming and Scripting
hi i have following code
my $a1 = "A" ;
my $a2 = "B" ;
my $a3 = "C" ;
foreach my $k ( 1,2,3 )
{
my $msg = ${a{$k}} # this should be at runtime i am creating variable a1 and assigning it value to msg .
print "$msg\n" ;
}
above thing is not working !!!
i want when k = 1... (4 Replies)
Discussion started by: zedex
4 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to convert the below Csh while loop into Perl while loop but the problem is that in this csh script, i have 2 variables inside a variable -> $count is a variable {SB$count} as a whole is another variable. Csh is able to assign values to such variable like the below but i do... (3 Replies)
Discussion started by: Raynon
3 Replies
8. Shell Programming and Scripting
Hi
How do i assign the output of a unix command to a variable ? say i want the whoami output to be assigned to a variable?
Thanks (2 Replies)
Discussion started by: PrasannaKS
2 Replies
9. UNIX for Dummies Questions & Answers
i have to do an assingment using mailx, where can i find info on mailx?
*yes i read the rules, so i am not asking for the asnwers, just need to learn about mailx more (1 Reply)
Discussion started by: punk_87
1 Replies
10. Shell Programming and Scripting
Hi friends,
I want to use query string value to another variable but it gives following error when I use it with print out command,
Insecure dependency in open while running with -T switch at C:/Program Files/Apache Group/Apache2/cgi-bin/cdr_findere.pl line 119.
My code as follows,
my... (0 Replies)
Discussion started by: maheshsri
0 Replies