Search Results

Search: Posts Made By: chaitanyapn
1,991
Posted By chaitanyapn
Extracting dynamic values
Hi,

I am stuck with extracting values by combining 2 dynamically extracted values.

The code goes like this

#!/usr/bin/ksh

ID1="abcd"
i=1 #this is a dynamic value and keeps on...
46,784
Posted By chaitanyapn
Hi fpmurhy, The code worked fine ..:)
Hi fpmurhy,
The code worked fine ..:)
46,784
Posted By chaitanyapn
Hi System Shock & pludi, thanks for the...
Hi System Shock & pludi,

thanks for the inputs.
What I want is
if IP="10.150.12.1" and netmask="255.255.255.0",
I want networkno to be 10.150.12.

I do not know how to change strings into...
46,784
Posted By chaitanyapn
how to calculate netwrk from IP address and netmask using Bitwise AND in shell script
Hi,

I am having two variables
IP="10.150.12.1"
netmask="255.255.255.0"

To get network number, I know that a bitwise & will help.
networkno=IP & netmask

My code is
#!/usr/bin/ksh...
6,224
Posted By chaitanyapn
thanks for the reply summer_cherry ... I...
thanks for the reply summer_cherry ...

I forgot to mention that I want the solution in shell scripting ...
6,224
Posted By chaitanyapn
split a sentence and seperate into two lines
Hi,

I have a string as
str="route net,-hopcount,1,255.255.255.0,10.230.20.111,10.230.20.234 Route True route net,-hopcount,0,-netmask,255.255.248.0,0,10.230.23.254 Route True"

I need to...
4,350
Posted By chaitanyapn
Hi, The below solution is without using awk. ...
Hi,
The below solution is without using awk.
If you are not very particular about using awk, you can try this

tmp> cat tmp.txt
AB
BC
CD
DE
tmp>

#!/usr/bin/ksh
abc=`cat tmp.txt`...
Showing results 1 to 7 of 7

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