can u help me out to print last two words of each sentence of a file.
for example.
contents of input file:
i love songs
my favourite songs
sent
songs all kind
good buddy
Ouput file should contain:
love songs
favourite songs
sent
all kind
good buddy (5 Replies)
hi
i have a line
"abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc"
I want to print the no of words, words separated by comma
please help (3 Replies)
Hi, im having a problem with xargs, i want to cout word of each line in file, and i HAVE to use xargs, i tried:
cat file | xargs wc -w .....that uses all words in file like name of files and passed then to wc so it worte wc :somewordformfile is not i afile or directory
cat file | xargs -I{} wc... (3 Replies)
Hi experts
I need to pick 2 matched words from the same line.....
I have given below an example file
eg:
O14757 hsa04110 hsa04115 2 P38398 hsa04120 1
O15111 hsa04010 hsa04210 hsa04920 hsa04620 hsa04660 hsa04662 hsa05200 hsa05212 hsa05221 hsa05220 hsa05215 hsa05222 hsa05120 13 O14920... (4 Replies)
I would like to cut words based on the word count of a line. This over here inspired me with some ideas but I wasn't able to get what I needed.
https://www.unix.com/shell-programming-scripting/105841-count-words-each-line-file-using-xargs.html
If the line has 6 words I would like to use this.... (8 Replies)
Hi,
Please suggest a way to print number of words in the end of each line.
<input file>
red aunt house
blue sky
bat and ball game
<output file>
red aunt house 3
blue sky 2
bat and ball game 4
Thanks! (2 Replies)
Hi all,
I have a file in which each string from column 1 is associated with one or multiple strings from column 2. For an example, in the sample input below, Gene1 from column1 is associated with two different strings from column 2 (BP1 and BP2).For every unique string from column 1, I need to... (9 Replies)
Hi Folks :)
I have a .txt file with thousands of words. I'm trying to sort the lines in order based on number of words per line.
Example
from:
word
word word word
word word
word word word word
word
word word word
word word
to desired output:
word (2 Replies)
Discussion started by: martinsmith
2 Replies
LEARN ABOUT HPUX
xhpdeviceautorepeaton
XHPDeviceAutoRepeatOn(3X)XHPDeviceAutoRepeatOn(3X)NAME
XHPDeviceAutoRepeatOn - Turn autorepeat on for an extension input device.
XHPDeviceAutoRepeatOff - Turn autorepeat off for an extension input device.
SYNOPSIS
int XHPDeviceAutoRepeatOn (display, deviceid, rate)
Display *display;
XID deviceid;
unsigned int rate;
int XHPDeviceAutoRepeatOff (display, deviceid)
Display *display;
XID deviceid;
ARGUMENTS
display Specifies the connection to the X server.
deviceid Specifies the ID of the desired device.
rate Valid for XHPDeviceAutoRepeatOn only. Specifies the auto-repeat rate. Valid values are: REPEAT_30, which will cause repeats
to take place every 1/30th second, and REPEAT_60, which will cause repeats to take place every 1/60th second.
DESCRIPTION
These requests are part of an HP-proprietary extension to X. Their functionality has been superseded by the standard X input device
extension XChangeFeedbackControl request. You should use XChangeFeedbackControl instead of XHPAutoRepeatOn and XHPAutoRepeatOff if
possible.
These requests are provided to support the use of input devices other than the X keyboard and X pointer device. They cannot be used to
turn auto-repeat on or off for the X keyboard device. The core XAutoRepeatOn and XAutoRepeatOff requests should be used for that purpose.
XHPDeviceAutoRepeatOn turns on or changes auto-repeat for an extended input device that is attached to the specified display.
XHPDeviceAutoRepeatOff turns off autorepeat for an extended input device that is attached to the specified display.
RETURN VALUE
none
DIAGNOSTICS
Either request can return a BadDevice error. XHPDeviceAutoRepeatOn can return a BadValue error.
BadDevice An invalid device ID was specified.
BadValue An invalid rate was specified.
FILES
/usr/include/X11/XHPlib.h
ORIGIN
Hewlett-Packard Company
SEE ALSO XAutoRepeatOn(3x)XAutoRepeatOff(3x)X Version 11 Release 5 XHPDeviceAutoRepeatOn(3X)