My previous solution works with reading Input_file 2 times, try following with reading Input_file single time only.
Output will be as follows.
Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
hi..im new to UNIX...
ok i have this information in the normal shell...
there are 2 lines display like this:
h@hotmail.com
k@hotmail.com
i want it to display like this with a space betweem them
h@hotmail.com k@hotmail.com
the information is stored in a text file....
anyone... (10 Replies)
I have searched the forum for this - forgive me if I missed a previous post.
I have the following file:
blah blah blah
blah blah blah
blah blah blah
blah blah blah
blah blah blah
alter table "informix".esc_acct add constraint (foreign key (fi_id)
references "informix".fi ... (5 Replies)
Hi,
I have requirement that I need to split my input file into two files based on a search pattern "abc"
For eg. my input file has below content
abc
defgh
zyx
I need file 1 with
abc
and file2 with
defgh
zyx
I can use grep command to acheive this. But with grep I need... (8 Replies)
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited,
that are in $1 of gene which is just a single column of text.
However only the line with the greatest $9 value in input needs to be printed.
So in the example below all the MECP2 and LTBP1... (0 Replies)
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Team,
I am trying to use sed to delete 15 lines, after pattern patch, which includes the pattern as well in Solaris. I used the below command, as we do it Linux, but it's not working as expected in Solaris.
I am getting the error as "garbled".sed '/\/table/,+15d' status.html
sed: command... (8 Replies)
Discussion started by: Nagaraj R
8 Replies
LEARN ABOUT DEBIAN
joy
JOY(4) BSD Kernel Interfaces Manual JOY(4)NAME
joy -- joystick device driver
SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file:
device joy
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
joy_load="YES"
In /boot/device.hints:
hint.joy.0.at="isa"
hint.joy.0.port="0x201"
hint.joy.1.at="isa"
hint.joy.1.port="0x201"
#include <sys/joystick.h>
DESCRIPTION
The joystick device driver allows applications to read the status of the PC joystick.
This device may be opened by only one process at a time.
The joystick status is read from a structure via a read() call. The structure is defined in the header file as follows:
struct joystick {
int x; /* x position */
int y; /* y position */
int b1; /* button 1 status */
int b2; /* button 2 status */
};
Positions are typically in the range 0-2000.
One line perl example:
perl -e 'open(JOY,"/dev/joy0")||die;while(1)
{sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j
";sleep(1);}'
ioctl calls
Several ioctl() calls are also available. They take an argument of type int *
JOY_SETTIMEOUT int *limit
Set the time limit (in microseconds) for reading the joystick status. Setting a value too small may prevent to get correct
values for the positions (which are then set to -2147483648), however this can be useful if one is only interested by the
buttons status.
JOY_GETTIMEOUT int *limit
Get the time limit (in microseconds) used for reading the joystick status.
JOY_SET_X_OFFSET int *offset
Set the value to be added to the X position when reading the joystick status.
JOY_SET_Y_OFFSET int *offset
Set the value to be added to the Y position when reading the joystick status.
JOY_GET_X_OFFSET int *offset
Get the value which is added to the X position when reading the joystick status.
JOY_GET_Y_OFFSET int *offset
Get the value which is added to the Y position when reading the joystick status.
TECHNICAL SPECIFICATIONS
The pinout of the DB-15 connector is as follow:
1 XY1 (+5v)
2 Switch 1
3 X1 (potentiometer #1)
4 Switch 1 (GND)
5 Switch 2 (GND)
6 Y1 (potentiometer #2)
7 Switch 2
8 N.C.
9 XY2 (+5v)
10 Switch 4
11 X2 (potentiometer #3)
12 Switch 3&4 (GND)
13 Y2 (potentiometer #4)
14 Switch 3
15 N.C.
Pots are normally 0-150k variable resistors (0-100k sometimes), and according to the IBM technical reference, the time is given by Time =
24.2e-6s + 0.011e-6s * R/Ohms
FILES
/dev/joy? joystick device files
HISTORY
The joy driver appeared in FreeBSD 2.0.5.
AUTHORS
Jean-Marc Zucconi <jmz@cabri.obs-besancon.fr>
BSD January 23, 1995 BSD