Sponsored Content
Top Forums Shell Programming and Scripting problem in assigning substr to a variable inside awk Post 302471468 by loggedin.ksh on Saturday 13th of November 2010 03:46:51 AM
Old 11-13-2010
Now i'm able to get valid results.
Thanks for your immediate replies.Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

awk substr and variable for next n characters?

Here is my code let x=10 #or any other calculated value done here `echo $sol | awk '{print substr($0,1,(x-3))}'` Question. I am able to use the variable x in beginning at character "1" but I get nothing when using it for the next n characters. Should I be able to... (1 Reply)
Discussion started by: smacleod
1 Replies

2. Shell Programming and Scripting

problem assigning values to variable

Date of Request: 20080514 10:37 Submitted By: JPCHIANG i want to get the value "JPCHIANG" only in read a file, however, when i do this: name=`"$line"|cut -d " " -f8` it display all the line and append 'not found' at the end of the statement the $line is actually a variable in a... (2 Replies)
Discussion started by: finalight
2 Replies

3. Shell Programming and Scripting

Problem with assigning output of grep + awk to a variable

Hi All, I am getting the output for the following command when i run it on the unix console. --------------------------- grep `whoami` /etc/passwd | awk '{print ($1);}' | cut -d ":" -f3 ---------------------------- But i made it into a script and tried to print the variable, its... (5 Replies)
Discussion started by: meheretoknow
5 Replies

4. Shell Programming and Scripting

Assigning Variable to AWK statement

Hi, The following command runs on in the Korn shell prompt. however i want to output the value of this to a variable. Can anyone provide a solution? echo 'ABC,DEF,"G,HI,J",KLM,"MNi,O"'| awk -F "\"" '{for(i=1;i<=NF;i++){if(i%2)gsub("\,","~^~",$i)}}1' (2 Replies)
Discussion started by: ladarlsan
2 Replies

5. Shell Programming and Scripting

problem in assigning variable

suppose in my script i have written a1=2 a2=4 read option # I directly want to see the value of a1 or a2 (i:e; 1 or2 )depending upon i/p given like a1 or a2 to option var.so what should i give .Suppose if I give a1 to option then how can I see the value. echo $$option --- doesn't work pls... (3 Replies)
Discussion started by: maitree
3 Replies

6. UNIX for Advanced & Expert Users

couting occurences of a character inside a string and assigning it to a variable

echo "hello123" | tr -dc '' | wc -c using this command i can count the no of times a number from 0-9 occurs in the string "hello123" but how do i save this result inside a variable? if i do x= echo "hello123" | tr -dc '' | wc -c that does not work...plz suggest..thanks (3 Replies)
Discussion started by: arindamlive
3 Replies

7. Shell Programming and Scripting

Problem using variable inside awk

HI, This is the code I am using: awk -v aaa="connect" 'BEGIN {IGNORECASE} /aaa/,/!/ {print NR}' bb This does not throw any error but it does not work. Pls help Thanks. (4 Replies)
Discussion started by: sudvishw
4 Replies

8. Shell Programming and Scripting

Assigning a value to variable through awk

I am trying to assign a value to a variable thru awk and I am having a lot of problem with it. Pls see the code snippet. The one in RED is the actual code. Other lines are the op created by the system. As you can see from the data, I was expecting an output of DG010 SDS FILE for FILE_NAME... (6 Replies)
Discussion started by: vskr72
6 Replies

9. Shell Programming and Scripting

problem in assigning value to variable have value fo other variable

my script is some thing like this i11="{1,2,3,4,5,6,7,8,9,10,11,}" echo "enter value" read value ..............suppose i11 x="$value" echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,} but its showing "i11" only. plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 Replies

10. Shell Programming and Scripting

Assigning output from awk to variable

I have a script whose contents are as below result= awk 's=100 END {print s }' echo "The result is" $result The desired output is The result is 100 My script is running without exiting and i am also not getting the desired output. Please help (5 Replies)
Discussion started by: bk_12345
5 Replies
ssmping(1)						      General Commands Manual							ssmping(1)

NAME
ssmping - check if you can receive IPv4/IPv6 multicast data from an internet host SYNOPSIS
ssmping [ -46v ] [ -I interface ] [ -c count ] [ -s size ] host ssmpingd DESCRIPTION
ssmping and ssmpingd are network level multicast management tools that can be used to check whether one can receive multicast packets via SSM from a host. The host target given to ssmping must run the ssmpingd daemon, which listens on UDP port 4321 for IPv4 and IPv6 unicast requests. When it receives one, it responds to a well known SSM multicast group which ssmping just have joined. Depending on whether the request was made with IPv4 or IPv6, the group is 232.43.211.234 or ff3e::4321:1234 respectively. OPTIONS
For ssmpingd there are no options. For ssmping the options are as follows. -4 Force IPv4 -6 Force IPv6 -v Print client and server version information. -I interface Interface to join on -c count Stop after sending (and receiving) count requests (and replies) -s size Request replies to have a size of size bytes SEE ALSO
asmping(1) a tool for checking whether can receive ASM. dbeacon(1) a distributed beacon multicast implementation. BUGS
Please report them to Stig Venaas <venaas@uninett.no>, the author of this tool. HISTORY
ssmping and ssmpingd were developed by Stig Venaas during the early days of the m6bone, the IPv6 multicast backbone. User Manuals ssmping(1)
All times are GMT -4. The time now is 10:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy