Vivek Unni

Greenhorn
+ Follow
since Aug 11, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vivek Unni

Hi,

Yes, I had written it using Scanner to read the file and search for the string.

I mainly need help in two things:

1) getting the start and end line numbers once the node name is found.
2) based on the line numbers, remove the contents of the file


Sample node entry:

WAS_CD1:\ // Here's the start line number
:conn.retry.stwait=00.00.00:\
:conn.retry.stattempts=6:\
:conn.retry.ltwait=00.00.00:\
:conn.retry.ltattempts=6:\
:tcp.max.time.to.wait=0:\
:runstep.max.time.to.wait=0:\
:contact.name=:\
:contact.phone=:\
:descrip=:\
:sess.total=255:\
:sess.pnode.max=255:\
:sess.snode.max=255:\
:sess.default=1:\
:comm.info=oldadcvipa1.ipc.us.aexp.com;1364:\
:comm.transport=tcp:\
:comm.bufsize=16000:\
:pacing.send.delay=0:\
:pacing.send.count=0: // Here's the end line number
9 years ago
Hi Fred,

Thanks, I need all the 3 parts mentioned in the mtd.

// logic 1 - to check the file pointed by filepath to have entry for nodename.
// logic 2 - if it is there, get the start line no and end line no
// logic 3 - Based on the line nos, need logic to remove the contents from the file.


9 years ago
Hi Team,

Could you pls help me to write the logic in the below given Java method.

Public static boolean updateNetMap(String filepath, String nodename){

// check the file pointed by filepath to have entry for nodename.
// if it is there, get the start line no and end line no
// Based on the line nos, need logic to remove the contents from the file.
}

Below is the sample node entry, which we need to identify and delete (here nodename is WAS_CD1):

WAS_CD1:\
:conn.retry.stwait=00.00.00:\
:conn.retry.stattempts=6:\
:conn.retry.ltwait=00.00.00:\
:conn.retry.ltattempts=6:\
:tcp.max.time.to.wait=0:\
:runstep.max.time.to.wait=0:\
:contact.name=:\
:contact.phone=:\
:descrip=:\
:sess.total=255:\
:sess.pnode.max=255:\
:sess.snode.max=255:\
:sess.default=1:\
:comm.info=oldadcvipa1.ipc.us.aexp.com;1364:\
:comm.transport=tcp:\
:comm.bufsize=16000:\
:pacing.send.delay=0:\
:pacing.send.count=0:


9 years ago
Hi,

Need code logic or regex to get substring between two different delimiters and then parse it into Integer array.

My Input String is : Transmitter#MSE14_REC_FTP40 #138^TPPurgeUility_test #103^YUG_Trans #57^

Output (ie. substring between "#" and "^")

138
103
57

Thanks,
Vivek
9 years ago