Hi!
I am working in korn shell. I want to reset the dimiliter for the set command to "|" but instead of a command prompt return I am getting something as below
After issuing the command I am getting this....as if the shell is expecting something else. Can anybody suggest what's the problem.
... (2 Replies)
im messing up somehwere...and can't seem to clean up the script...for it to work
objectives:
1. check for today's file, and sleep 30 secs between retries
2. only allow 5 tries before script should fail.
3. if today's file found, wait 30 seconds for it to process..
code:
count=0... (8 Replies)
Hi,
This is out of curiosity:
I wanted to extract year, month and date from a variable, and thought that combining read and IFS would help, but this doesn't work:
echo "2010 10 12" | read y m d
I could extract the parts of the date when separated by a -, and setting IFS in a subshell:
... (3 Replies)
Given the scenario like this, if at all if have to use IFS on the below given example, how it should be used.
IFS=/
eg:
/xyz/123/348/file1
I want to use the last slash /file1 . So can anyone, suggest me how to pick the last "/" as a IFS. (4 Replies)
hi I keep getting an error with this nested if statement and am getting the error unexpected end of file, can anyone help me as to why this wont execute?
#!/bin/bash
#script to check wether the -i -v statements run correctly
removeFile ()
{
mv $1 $HOME/deleted
}... (3 Replies)
I am using bash and resetting IFS as below when reading the command line arguments. I do this so I can call my script as in Ex1.
Ex1: ./synt2d-ray3dmod.bash --xsrc=12/20/30
This allows me to split both sides so that when I do "shift"
I can get 12/20/30
What I do not understand is... (21 Replies)
Hi ,
i am in my initial learning phase of unix. i was going thru the function part.
below is the example which was there but i am not able to understand logic and the use of IFS(internal field separator)
lspath() {
OLDIFS="$IFS"
IFS=:
for DIR in $PATH ; do echo $DIR ; done
IFS="$OLDIFS"... (8 Replies)
Hello masters of scripting,
I've been working to develop some basic monitoring scripts. I have solved one problem, but want to know how to solve the other.
I have a script that runs locally to create an output file with the Linux system kernel paramters, preceeded by the system name:
... (2 Replies)
i have data that is delimited with #x#:
file1#x#file2#x#file3
file4#x#file5#x#file6
data is stored in a variable called ALLMYDATA:
echo "${ALLMYDATA}" | while IFS="#x#" read -r line junk
do
echo ${line}
done
it appears IFS does not allow the specification of more than one... (5 Replies)
Discussion started by: SkySmart
5 Replies
LEARN ABOUT MOJAVE
keyboard_translatekeys
keyboard_translatekeys(3) Svgalib User Manual keyboard_translatekeys(3)NAME
keyboard_translatekeys - modify scancode mappings in raw keyboard mode
SYNOPSIS
#include <vgakeyboard.h>
void keyboard_translatekeys(int mask);
DESCRIPTION
This function sets several flags which control how certain scancodes are mapped. At startup a mask value of 0 is active.
mask must be a logical or of zero or more of the following #predefined integers to turn the features listed on:
TRANSLATE_CURSORKEYS
Translate the scancodes of the SCANCODE_CURSORBLOCK* keys to those of the cursor keys on the number pad, s.t. keyboard_getstate(3)
and keyboard_keypressed(3) report a keypress of the corresponding number pad cursor key and not the one on the cursor block.
TRANSLATE_DIAGONAL
Translates the scancodes of diagonal cursor keys (keypad 7, 9, 1, 3) to presses of two of the ordinary up, down, left, right keys.
For example, instead of reporting a press of SCANCODE_CURSORUPRIGHT keyboard_getstate(3) and keyboard_keypressed(3) report a simul-
taneous press of SCANCODE_CURSORUP and SCANCODE_CURSORRIGHT.
TRANSLATE_KEYPADENTER
The scancode of the keypad enter key is mapped to that of the ordinary enter key, s.t. keyboard_getstate(3) and keyboard_key-
pressed(3) report a press of SCANCODE_ENTER regardless if keypad enter or ordinary enter is pressed.
DONT_CATCH_CTRLC
Pressing <Ctrl>-C does not raise a SIGINT. On contrary to the other flags this has also effect when a user defined keyboard event
handler is used. Svgalib will always process <Alt>-F1 - <Alt>-F10 and perform console switches accordingly.
BUGS
The TRANSLATE_* options above do really do simple scancode translations. For example, when TRANSLATE_KEYPADENTER is active and the user
presses both enter and keypad enter. Then, if he releases one of them (say keypad enter), it's release event will clear the common keyboard
state, s.t. no keypress is reported even though enter is still pressed.
Similarly, if TRANSLATE_DIAGONAL is active, the user holds cursor upleft (keypad 7) down and then presses and release cursor up (keypad 8),
svgalib will only report a pressed cursor left but the simulated cursor up will be lost. You can easily try this with the keytest(6) demo
to make the effect more clear to you.
SEE ALSO svgalib(7), vgagl(7), libvga.config(5), keytest(6), eventtest(6), keyboard_seteventhandler(3), keyboard_init(3), key-
board_init_return_fd(3), keyboard_close(3), keyboard_update(3), keyboard_waitforupdate(3), keyboard_setdefaulteventhandler(3), key-
board_getstate(3), keyboard_clearstate(3), keyboard_keypressed(3), vga_waitevent(3)AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced function as well as of the
original documentation is unknown.
It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>.
Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections
to this first version of the svgalib manual.
Svgalib (>= 1.2.11) 29 July 1997 keyboard_translatekeys(3)