the below is my code. i'm not able to retrieve the "position" value.
The parameters which will be passed to the function will be like " mask <file_name> \$1 |
Moderator's Comments:
I asked you kindly to use code tags - instead you just formatted it with fonts. It is awful to remove all those font formattings to be able to add indention that you also did not use. You get a reminder for this and a PM with an instruction how and when to use code tags.
Last edited by zaxxon; 02-02-2011 at 10:08 AM..
Reason: code tags again
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (1 Reply)
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (2 Replies)
Hello,
Could anyone help me with some KSH syntax? I'm trying to pass a list as a function parameter in a KSH?
For example I have code like this:
print_counter() {
N=$1
C=$2
for A in $C; do
echo "This is $N number $A"
done
}
NAME=BRICK
COUNT=" 1 2 3 4"
... (2 Replies)
HI all
I have a code like
##############################################
minyear()
{
curryear=$1
echo $curryear
}
##Main Program ##
minyear
exit
#######
when i execute "sh scriptname 2005" output should be like 2005 but the output is blank.
I guess i need to pass parameter to... (3 Replies)
am a beginer of shell Unix, plesase tell me how to get parameter with $perl in loop
$ perl -lne '$/="DOCEND";print $_."DOCEND" if /$ACC/' file_input > output
i can't get parameter in loop with perl fucntion like this
pass paramerter to $ACC not accept in this script
$ACC = paramerter to... (4 Replies)
Hi guys,
can someome help with this question, I have defined a function that takes a command as a parameter, but when the command is executed from the function it will throw errors because what I believe is a special character escaping issue. I tried using the backslash to escape the pipe | and >... (2 Replies)
Hi All,
Just trying to implement the below shell script using AIX ksh shell.
myfunc {
eval "$*"
}
CMD='ls -la /etc/hosts | awk '{print $9"|"$5}''
myfunc $CMD
Keeping getting "|}: not found" errors, any pointers would greatly be appreciated.
Kind Regards
Ed
Please... (2 Replies)
Hi All,
I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter.
Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)
Discussion started by: mysocks
5 Replies
LEARN ABOUT CENTOS
xkbgetindicatormap
XkbGetIndicatorMap(3) XKB FUNCTIONS XkbGetIndicatorMap(3)NAME
XkbGetIndicatorMap - Gets the map for one or more indicators, using a mask to specify the indicators
SYNOPSIS
Status XkbGetIndicatorMap (Display *dpy, unsigned int which, XkbDescPtr desc);
ARGUMENTS
- dpy connection to the X server
- which
mask of indicators for which maps should be returned
- desc keyboard description to be updated
DESCRIPTION
Xkb allows applications to obtain information about indicators using two different methods. The first method, which is similar to the core
X implementation, uses a mask to specify the indicators. The second method, which is more suitable for applications concerned with interop-
erability, uses indicator names. The correspondence between the indicator name and the bit position in masks is as follows: one of the
parameters returned from XkbGetNamedIndicators is an index that is the bit position to use in any function call that requires a mask of
indicator bits, as well as the indicator's index into the XkbIndicatorRec array of indicator maps.
XkbGetIndicatorMap obtains the maps from the server for only those indicators specified by the which mask and copies the values into the
keyboard description specified by desc. If the indicators field of the desc parameter is NULL, XkbGetIndicatorMap allocates and initial-
izes it.
To free the indicator maps, use XkbFreeIndicatorMaps.
DIAGNOSTICS
BadAlloc Unable to allocate storage
BadMatch A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise
invalid
BadImplementation
Invalid reply from server
SEE ALSO XkbFreeIndicatorMaps(3), XkbGetNamedIndicators(3)X Version 11 libX11 1.6.0 XkbGetIndicatorMap(3)