Sponsored Content
Top Forums Shell Programming and Scripting Limit on number of pipes after long-running command? Post 303035198 by DevuanFan on Thursday 16th of May 2019 11:14:57 AM
Old 05-16-2019
@vgersh99: X input devices have id's, which vary from machine to machine (on my machine, X sees the keyboard as input id=6 and mouse as input id=7, for instance).

Yes, the command you suggested gives the desired output when I type unix:
Code:
$ xinput test 6 | awk '/press/ {print $3}'
30
57
31
53

But it still leaves unanswered why we can only use one pipe after xinput test 6. For instance, this command produces no output when I type unix, although I'd expect grep to generate some ouput when u is pressed:
Code:
$ xinput test 6 | awk '/press/ {print $3}' | grep 30

What I'm trying to understand is why one pipe after xinput test 6 works fine, but two pipes never produce any output even when output is expected. That's the point of the thread.

Last edited by DevuanFan; 05-16-2019 at 12:20 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to limit the number of running instances of a script?

I would like to allow only one instance of a script to run at any moment. I've tried the following solution to count the instances but the result is always the number of running instances plus one and I can't find the problem ps -ef | grep $0 | sed '/^$/ d' | sed '/grep/ d' | wc -l Please... (2 Replies)
Discussion started by: oti
2 Replies

2. UNIX for Dummies Questions & Answers

Number of long limit

Hi Hi! I'm currently using AIX 5.2 and would like to know where can i find to see that there's a restriction on the number of login times a user can have. Example, I want give a 2 login per user but some one to give 3 login and some one have to give unlit login time (without logging off the... (2 Replies)
Discussion started by: herath
2 Replies

3. Shell Programming and Scripting

Counting the number of pipes in line

Hi, I'm using the ksh shell. The scenario: I have a couple of directories /home/fd /home/fd/prsd home/fd/stg now i have number of files in each of these directories. some of the files are zipped using gzip so their extension is .gz the content of the files is as follows ... (4 Replies)
Discussion started by: nirnay_s
4 Replies

4. Solaris

How to limit number of Commands

Is there a way that I can limit number of commands that one user can run during period of time. For example Max 10 commands per senconds.:) (3 Replies)
Discussion started by: winger0608
3 Replies

5. UNIX for Advanced & Expert Users

Limit on Number of Cron Jobs Running on one Account

Hello, I have some 150 Cron Jobs running under my UNIX account. I want to add some more jobs. Is there a limit to the number of cron jobs that can be run on an account? Thank you. Pramodini (8 Replies)
Discussion started by: Pramodini Rode
8 Replies

6. Shell Programming and Scripting

While loop running after reaching limit

Hi frnds i am newbie in linux and trying to write a simple script for adding users.the problem is i am running a while loop under function and loop is running for 3 time more than limit.Here is my Script and output pls help me out : # CREATE N NO. OF USERS WITH PASSWORD IN SYSTEM #... (4 Replies)
Discussion started by: Vaibhav.T
4 Replies

7. UNIX for Dummies Questions & Answers

Limit Number of files

hi guys how can i limit number of files in a disk or partition ? or how can i make a limit to inode number for a disk or partition ? ext3 or ext4 file system (1 Reply)
Discussion started by: mhs
1 Replies

8. UNIX for Dummies Questions & Answers

Limit process number in TOP command outupt

Linux top command prints more than 40 processes. top -b -n 1 > Top_Output.txt Is there a straight-forward option/way to limit only till the top 5 processes. ( Instead of using head, tail or other unix commands together) (1 Reply)
Discussion started by: vikram3.r
1 Replies

9. UNIX for Beginners Questions & Answers

How to put a 80 character limit on a long topic line in markdown?

I have a topic line in markdown that spans more than 80 characters that i need to add a line break. Markdown is simply treating the line break as a brand new line instead of continuing as a topic line. Eg: # This is a very long line Markdown interprets it as This is a very long line (4 Replies)
Discussion started by: dragonpoint
4 Replies

10. UNIX for Beginners Questions & Answers

awk command input string too long, limit

cat filename| awk '{ $1=""; print $0}' in my file there are few lines that has more than 3000 characters per line and as soon as I run the above command it cores, strings core reveals that the awk is failing because input string too long, limit. can i get some help from the experts to find... (8 Replies)
Discussion started by: knijjar
8 Replies
xinput(1)						      General Commands Manual							 xinput(1)

NAME
xinput - utility to configure and test XInput devices SYNOPSIS
xinput [version] [list [device_name]] [set-pointer device_name] [get-feedbacks device_name] [set-mode device_name ABSOLUTE|RELATIVE] [set- ptr-feedback device_name threshold num denom] [set-integer-feedback device_name index value] [set-button-map device_name map button 1 [map button 2 [...]]] [query-state device_name] [test [-proximity] device_name] DESCRIPTION
xinput version test if the XInput extension is available and return the version number of the program. xinput list [device_name] If no argument is given list all the input devices showing all their features. If an argument is given, show all the feature of device_name. Uses XListInputDevices(3). xinput get-feedbacks device_name Display the feedbacks of device_name. Uses XGetFeedbackControl(3). xinput set-pointer device_name Switch device_name in core pointer. Uses XChangePointerDevice(3). xinput set-mode device_name ABSOLUTE|RELATIVE Change the mode of device_name. Uses XSetDeviceMode(3). xinput set-ptr-feedback device_name threshold num denom Change the acceleration of device_name. Uses XChangeFeedbackControl(3). xinput set-integer-feedback device_name index value Change the value of an integer feedback of device_name. Uses XChangeFeedbackControl(3). xinput set-button-map device_name map button 1 [map button 2 [...]] Change the button mapping of device_name. Uses XSetDeviceButtonMapping(3). xinput query-state device_name Query the device state. Uses XQueryDeviceState(3). xinput list-props device_name [device_name...] Lists properties that can be set for the given device(s). xinput set-int-prop device_name property format value Sets an integer property for the device. Appropriate values for format are 8, 16, or 32, depending on the property. xinput watch-props device_name Prints to standard out when property changes occur. xinput delete-prop device_name property Delete the property from the device. xinput test [-proximity] device_name Register all extended events from device_name and enter an endless loop displaying events received. If the -proximity is given, ProximityIn and ProximityOut are registered. device_name can be the device name as a string or the XID of the device. property can be the property as a string or the Atom value. COPYRIGHT
Copyright 1996,1997, Frederic Lepied. Copyright 2008, Philip Langdale. AUTHOR
Philip Langdale, <philipl@alumni.utexas.net> Frederic Lepied, France <Frederic.Lepied@sugix.frmug.org> Patches, bug reports, and suggestions are welcome. Frederic Lepied $Date: 1997/06/09 16:06:31 $ xinput(1)
All times are GMT -4. The time now is 02:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy