Sponsored Content
Full Discussion: shift not working
Top Forums UNIX for Dummies Questions & Answers shift not working Post 302204246 by Nagapandi on Wednesday 11th of June 2008 04:26:19 AM
Old 06-11-2008
SorrySmilie, found solutionSmilie, forgot to give enough level paramenters Smilie , now shift is working fine.

Thanks,
Naga Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shift command

There is an error when i am trying to use the shift command in this way: ($1 = -d, $2 = 123, $3 = -c etc etc) for $arg in $@ do case $arg in "-d") shift; (so that the $2 will become the $arg now) (and while it loop the 2nd time,) ... (1 Reply)
Discussion started by: AkumaTay
1 Replies

2. Shell Programming and Scripting

shift command

Hi Folks, In shell scripting the maximum no. of command line parameters becomes 9(Am i right). If we want to get more than 9 parameters we use the shift command. Even here there are two possibilities. 1. Without the use of variables - The arguments are lost and the lost no. is equal to the... (6 Replies)
Discussion started by: Nisha
6 Replies

3. Programming

Bit shift operator

Can someone pls tell me how is the operation different in the following two code snippets? main() { int temp=20742; short temp1; temp1 = temp << 8; printf("The vaue is %d\n",temp1>>8);} result:6 main() { int temp=20742; short temp1; temp1 =(temp << 8)>>8; printf("The vaue... (5 Replies)
Discussion started by: naan
5 Replies

4. Shell Programming and Scripting

Regarding the shift command???

I am running a program where in I have this command which is giving error the shift: number is not correct. can you please tell me how shift actually works? the line which is giving error is- set $PARAM; shift; shift; shift; shift; shift; shift; shift; shift Is it related somewhere to... (2 Replies)
Discussion started by: shrao
2 Replies

5. Shell Programming and Scripting

Shift array element

I want to delete and 0th element of array in shell scrpit and also shift all others to one level up. (2 Replies)
Discussion started by: darshakraut
2 Replies

6. UNIX for Dummies Questions & Answers

Shift Characters in Text

Hi Is there a unix script that will change the text in lefthand column to text in righthand column. 0 0 1 1 10 10 100 100 1000 1000 1001 1001 1002 1002 1003 1003 1004 1004 1005... (7 Replies)
Discussion started by: 1184jap
7 Replies

7. UNIX for Dummies Questions & Answers

A Shift into UNIX

Hi, Firstly, I did a search for this question both on this site and on the internet and have not been able to find a suitable answer that is not general in nature. I have always been a Windows user. I use my girl friend's mac every now and then, but I always come back to windows. For a... (1 Reply)
Discussion started by: mearex
1 Replies

8. Shell Programming and Scripting

Use of Shift command

Hello Expert Can any one please explain what is the use of shift command in general terms: set -- $(ls -t) shift rm -Rf $* what is the use of shift command over here. Thanks a lot for your help (2 Replies)
Discussion started by: aks_1902
2 Replies

9. Shell Programming and Scripting

Shift command help

#!/bin/bash hostname=$1; shift for hostname in $1 do ping $hostname done I want to run the above script as hostname.sh yahoo.com google.com cnn.com. I want to shift each hostname to $1. How can do that with above code as currently it's not shifting. (5 Replies)
Discussion started by: scj2012
5 Replies

10. UNIX for Beginners Questions & Answers

Shift record from one position to another

Hi All, I have a file and it is a fixed length file. I want to move the values from 42,6 ( where 6 is length) to the 36th position Original file: 00000100000100000100000100000100001 000870 ... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
XkbCopyKeyType(3)						   XKB FUNCTIONS						 XkbCopyKeyType(3)

NAME
XkbCopyKeyType - Copy one XkbKeyTypeRec structures SYNOPSIS
Status XkbCopyKeyType (XkbKeyTypePtr from, XkbKeyTypePtr into); ARGUMENTS
- from pointer to XkbKeyTypeRec to be copied - into pointer to XkbKeyTypeRec to be changed DESCRIPTION
XkbCopyKeyType copies the key type specified by from to the key type specified by into. Both must point to legal XkbKeyTypeRec structures. Xkb assumes from and into point to different places. As a result, overlaps can be fatal. XkbCopyKeyType frees any existing map, preserve, and level_names in into prior to copying. If any allocation errors occur while copying from to into, XkbCopyKeyType returns BadAlloc. Oth- erwise, XkbCopyKeyType copies from to into and returns Success. STRUCTURES
Key types are used to determine the shift level of a key given the current state of the keyboard. The set of all possible key types for the Xkb keyboard description are held in the types field of the client map, whose total size is stored in size_types, and whose total number of valid entries is stored in num_types. Key types are defined using the following structure: typedef struct { /* Key Type */ XkbModsRec mods; /* modifiers used to compute shift level */ unsigned char num_levels; /* total # shift levels, do not modify directly */ unsigned char map_count; /* # entries in map, preserve (if non-NULL) */ XkbKTMapEntryPtr map; /* vector of modifiers for each shift level */ XkbModsPtr preserve; /* mods to preserve for corresponding map entry */ Atom name; /* name of key type */ Atom * level_names; /* array of names of each shift level */ } XkbKeyTypeRec, *XkbKeyTypePtr; DIAGNOSTICS
BadAlloc Unable to allocate storage X Version 11 libX11 1.5.0 XkbCopyKeyType(3)
All times are GMT -4. The time now is 05:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy