Search Results

Search: Posts Made By: manmeet
Forum: Programming 03-06-2009
18,088
Posted By manmeet
How to use htons() function?
Hi I am constructing an ICMP packet using C++ and want to convert sequence number into network byte order. I know we can use htons: here is my code:

struct ICMPheader
{
unsigned int...
1,760
Posted By manmeet
Thank u so much for ur kind help n ur time..:)
Thank u so much for ur kind help n ur time..:)
1,760
Posted By manmeet
Need help with sort command
Hi i have a file containing ip addresses and want to sort those IP addresses in the ascending order.

file (match.txt) contents are:
192.168.0.100
192.168.0.16
192.168.0.10
192.168.0.23...
2,793
Posted By manmeet
i checked arp -a it worked but fetching only...
i checked arp -a it worked but fetching only systems present in my subnet. how to fetch info about everything?? is there a different command for it??
2,793
Posted By manmeet
Yes, i tried this one. but it gives me...
Yes, i tried this one. but it gives me information (including MAC address) of ethernet interfaces only. but there are number of systems connected to it having ip address for e.g. 192.147.0.1 -...
2,793
Posted By manmeet
Need help with IP and MAC addresses
Hi,
i am working on a project where i have to write a script to find out MAC addresses of the systems with given IP address.
Can anybody tell me which command i can use to find MAC address if you...
71,245
Posted By manmeet
Hi, Thanks for ur help. it works fine....
Hi,

Thanks for ur help. it works fine. Just i changed it a little bit by exhanging [:lower:] and [:upper:] classes bcoz this code is converting from lower to upper case..
71,245
Posted By manmeet
how to convert value in a variable from upper case to lower case
Hi, I have a variable $Ctrcd which contains country names in upper case and i want to convert them into lower case. I have tried so many solutions from already existing threads but couldn't get the...
2,710
Posted By manmeet
Hi Radoulov, Thanks for the explanation. i...
Hi Radoulov,
Thanks for the explanation. i understand it now....but your code is not working ..it's giving me error while fetching every record:
2,710
Posted By manmeet
Hi, Thanx for helping me out... actually i...
Hi,
Thanx for helping me out...
actually i am new at scripting ...can you explain me a liitle bit what your code is doing?? so that if at sometime i need to make changes in it...i can make..
2,710
Posted By manmeet
Problem with awk and if statement
Hi,
I have a task where i need to compare columns of two files.

First file is $REG_InputFileName:

"UPDATE","1010021126","1-01-01","USD"
"UPDATE","1013000101","1-01-01","THB"...
10,609
Posted By manmeet
Thanks...But this is kind of hard coded. Right...
Thanks...But this is kind of hard coded. Right now i only have sample input data to test my script. and i have no idea about the total number of fileds. So i can't use this code to filter...can you...
10,609
Posted By manmeet
Hi franklin, i am new to awk . Can you...
Hi franklin,

i am new to awk . Can you please exactly tell me where should i put this statement in my code. My code is exactly as above.
2,496
Posted By manmeet
Hi Lakris, Thanks you so much. It's working...
Hi Lakris,
Thanks you so much. It's working fine now...:)
10,609
Posted By manmeet
Hi Franklin, I didn't understand where i need...
Hi Franklin,
I didn't understand where i need to use that code??
10,609
Posted By manmeet
REG_InputFileName : "INSERT", "1000011206",...
REG_InputFileName :
"INSERT", "1000011206", "1-01-01", "THB"
"INSERT", "1000020307", "1-01-01", "USD"
"INSERT", "2000020113", "1-01-01", "USD"
"INSERT", "2000020411", "1-01-01", "THB"
"INSERT",...
10,609
Posted By manmeet
how to cut off last column from the output
I have a problem with my script. I am using following code
awk -F"," '{print $0,",",substr($2,3,3)}' $REG_InputFileName > $TargetSeqPath/Master.tmp

while read i
do
echo $i >...
2,496
Posted By manmeet
Hi Lakris, Thanks for reply.. here is code...
Hi Lakris,
Thanks for reply..
here is code i'm using to extract filename:

echo $1

InputFileName=basename $1
echo $InputFileName

in here when i echo $1 , it is showing file name with...
2,496
Posted By manmeet
Hi Dangral, I used basename command as...
Hi Dangral,
I used basename command as following, but in this way script is opening this file and fetching some columns from the file and showing error.
InputFileName=basename $1

and error is ...
2,496
Posted By manmeet
Thnx Dangral, I appreciate ur help
Thnx Dangral, I appreciate ur help
2,496
Posted By manmeet
need help with script
Hi
I need to extract file name from the whole path .
which is like :

/data/ds/dpr_bir2core17_dev/landing/region/InputSample

this is the whole path and i need to extract file name...
1,799
Posted By manmeet
Can anybody tell me what this following code is...
Can anybody tell me what this following code is doing?? i couldn't understand...

awk -F"," 'NR==FNR {col1[$1]=$3} NR!=FNR { if (col1[substr($2,2,3)]=="") {next} print $1}' $TargetSeqPath/Ref.tmp...
1,799
Posted By manmeet
Thank you so much for solution...i'll try this...
Thank you so much for solution...i'll try this way now...:)
1,248
Posted By manmeet
Problem with awk
I have a file from where i need to extrat 2nd column:
sample input is :
"THHSBC001900000006 CSG00100000 OTHOTH THB AA0100101100", "THHSBC001", "1-01-01", "THB"
"THHSBC001900273009...
1,799
Posted By manmeet
Problem with Substring
Hi,
i have a file from which i extracted 2nd column and put it into a variable Acct_Num . Now i need to extract first 3 digits from it and save in to other variable.
My Code is:

while read...
Showing results 1 to 25 of 51

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