Search Results

Search: Posts Made By: sureshcisco
Forum: Programming 05-04-2012
1,246
Posted By sureshcisco
Sum a number in different ways.
Hello, I need some help to correct my algorithm steps to sum a number. I am confused... please input some steps

Example:
Let's say a number 5.
Now we can get a list of numbers: 1, 2, 3, 4 (less...
2,311
Posted By sureshcisco
Heuristic Algorithm Example Analysis
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

It's a three...
1,746
Posted By sureshcisco
Heuristic Algorithm Example
Give a counter example such that the following heuristic algorithm, for the 2-tape problem, doesn't always produce the best solution:

Algorithm:
Sort {Xi} in descending order.
Place files in...
Forum: Programming 03-06-2012
1,124
Posted By sureshcisco
Difficult in analyzing an algorithm
Hello,

I was reading Heuritics text and came across an algorithm below. Finding hard to analyze it can any one help me out below...

How to analyze if I take say no. of types are 5 and each...
Forum: IP Networking 03-05-2012
1,418
Posted By sureshcisco
Lack of IP Connectivity
Hi

Can any one please help identify the issue in scenario 2:

Connectivity Diagram:
1) Distribution Switch----Int_Switch----LabSwitch(Fa1/0)----Terminal Ser
2) Distribution...
2,076
Posted By sureshcisco
script to open new cmd prompt for devices on visio
Hello,

Can any one please help:

I have a lab design on Visio, with routers and switches.

What I am planning to do is: when I double click a device icon - it should open a new cmd prompt...
1,928
Posted By sureshcisco
foreach $line(@file){ if ($line =~...
foreach $line(@file){
if ($line =~ s/\w+\sSTART\s\w+\s:\s(\d+)/$1/) {print "Job Start Date, $1\n"; }
if ($line =~ s/\w+\sEND\s\w+\s:\s(\d+)/$1/) {print "Job End Date, $1\n"; }
}
2,659
Posted By sureshcisco
Pravin and Chirel - both soln works, thanks so...
Pravin and Chirel - both soln works, thanks so much.
2,659
Posted By sureshcisco
Updated
Updated
2,659
Posted By sureshcisco
Perl - Sort and Count foreach line
Can any one please help I am trying to sort each item in every line and count the common (non case sensitive) and at the end printing all the unique alphabetically.

Here is what i did ... I can...
16,201
Posted By sureshcisco
Perl - save results to output file.
Can any one please help, the code works...I want the output of $result to be saved in an output.txt file which is lcoated in c:\\temp\\output.txt.



$filepath="C:\\temp\\ip.txt";
open...
2,856
Posted By sureshcisco
Tried but does works..
Tried but does works..
2,856
Posted By sureshcisco
cat in shell
Command "cat filename" works from cmd prompt. but cat is not found when I try to script it. can any one please correct the code.

C:\Users\src\scripts>cat "\\ser2\e$\Logs\Auth Files\Passed...
14,012
Posted By sureshcisco
It only executes the first half but cut -d','...
It only executes the first half but
cut -d',' -f3,6 | sort | uniq does not execute....

Thanks
14,012
Posted By sureshcisco
Thanks Joeyg. The command works from CLI, I am...
Thanks Joeyg. The command works from CLI, I am trying to script it:

Can you please check the code:

Log files in c:\\log are
Test Log 2011-01-24.csv
Test Log 2011-01-23.csv

...
7,659
Posted By sureshcisco
Change Directory in Perl
Hi

Can any one please support:

From Windows, I am running perl script located in C:/scripts directory and need to run a command "ls | sort | uniq" on the files in D:/temp directory.

...
14,012
Posted By sureshcisco
Script to Grep column 3 from csv file generated yesterday
Hello,

Can any one please assist how to scirpt it:

Every day a new log file is create and I want to process only the one generated yesterday and get the data of column 3 and 6.

For...
5,869
Posted By sureshcisco
grep 7th column from a file seperated with ^
Hi,

Can anyone help:

I want to get the 7th column of a file seperated by ^

Num:^ 1^ testdevice1^10.1.1.1^PT1X23^true^HD^175^up^false^bad
Num:^ 2^...
3,671
Posted By sureshcisco
Net::Telnet (match prompt)
Hi,
The code below is used to telnet to list of devices and configure them. The program executes in this manner:
1. telnet to the first device in file.txt
2. one the telnet command is executed a...
2,165
Posted By sureshcisco
Perl - run sub routine for list of devices
Hi,

Can anyone please correct the script such that it run on all the devices in the devicelist.txt file.

The problem is when the script runs it only reads the first device in the list,...
Forum: Infrastructure Monitoring 10-21-2010
2,289
Posted By sureshcisco
Script to configure few commands for a list of routers
Hi

Can any one please guide me how can I configure a few commands for a few devices in file1.txt.
username: user1
password: pass
enable pass: ep

file1.txt:
device1.abc.com...
3,019
Posted By sureshcisco
error in sh script while copy files to a backup directory
I am trying to copy files from one directory to another using shell script. Can anyone please troubleshoot the code.

thanks in advance...



#!C:\Shell\sh.exe
files_dir="C:\Documents and...
1,725
Posted By sureshcisco
Condition statement in perl
#!/usr/bin/perl
$output1 = "/home/log.txt"
$output2 = "/home/grep.txt"

#Statement1 creates an output file called log.txt.

#Statement2 greps a line from log.txt and store the result in...
3,183
Posted By sureshcisco
grep in perl
Hello

I want to grep a line from a file saved in some directory.

Can anyone please correct the code below:


#!/usr/bin/perl -w
$file = "/home/output.txt"
$grep_line = "closing zip...
3,257
Posted By sureshcisco
Pravin27....It works great Buddy! Thanks a lot.
Pravin27....It works great Buddy! Thanks a lot.
Showing results 1 to 25 of 63

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