grep is an external command, that's a (small) overhead.
To only use shell builtins, you can try to convert the RE to a glob (or multiple globs), and use it in a case-esac.
The glob match is less powerful, and often will look ugly - a reason to hide it in a function.
Last edited by MadeInGermany; 01-23-2019 at 04:58 AM..
These 2 Users Gave Thanks to MadeInGermany For This Post:
Okay, well this is more or less my first attempt at writing a shell script.
Anyways, here's my code:
cd ${PATH}
if
then
rm ${FILE}
./anotherScript
else
exit 1
fi
exit 1
Anyways, it's a pretty simple script that is supposed to search for the... (4 Replies)
Hello, i have a script which checks if the user entered 8 numeric characters in the form of YYYYMMDD (birth date). If the user entered any non numeric characters, an error will be displayed:
# Check to see if the 8 characters are all numbers
# If not show error essage
# And prompt user... (4 Replies)
Hi,
I want to use grep inside a test statement, but I am getting an error message.
Two variables
testvarNum=5
testvarNonNum=x
echo $testvarNum | grep *
The result of this is as follows:
5
However, when I try the following (i.e. to test if the variable is numeric or non-numeric):... (3 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hello ...again.
I am stuck on this part, I have a loop with processes an operations file.
and calls different functions depending on what is in loop, which processes a database file...
#so far my add function works as intended
add()
{
...blah blah;
}
# delete is kinda working... (13 Replies)
Hello,
I have a problem. I will search files on fileextentions (suffix). It can with the command find, but I will do it with the commands grep and/or test. When i start the script I will see all files with that extention (suffix).
Can anyone help me, please?
Thanks!
Regards,
Arjan... (4 Replies)
Hi all. I am trying to compare and filter two files. I have a bigfile.txt of names and ids and a smallfile.txt of ids only. What I am trying to do is use a while read loop to read the ids in the bigfile and then echo the name and id only if the id exists in the small file. Basically, I'm trying to... (5 Replies)
read a
if test grep EOF $a
then echo yes file
else
echo no
fi (1 Reply)
Discussion started by: iamsumibisht
1 Replies
LEARN ABOUT SUSE
mousetweaks
mousetweaks(1) General Commands Manual mousetweaks(1)NAME
mousetweaks - Accessibility enhancements for the mouse
SYNOPSIS
mousetweaks [--enable-dwell] [--enable-secondary] [--dwell-time=FLOAT] [--secondary-time=FLOAT] [-m|--dwell-mode=STRING] [-c|--show-ctw]
[-x|--ctw-x=INT] [-y|--ctw-y=INT] [-t|--threshold=INT] [-s|--shutdown] [--disable-animations] [--daemonize] [-?|--help]
DESCRIPTION
mousetweaks is a daemon that provides various mouse features for the GNOME desktop. It depends on the Assistive Technology Service
Provider Interface (AT-SPI).
OPTIONS --enable-dwell
Automatically perform mouse clicks without using a physical button.
--enable-secondary
Trigger the secondary mouse button when the primary mouse button is held down for a specified amount of time.
--dwell-time=FLOAT
Time to keep the pointer motionless before a dwell click is performed. Range: 0.2 - 3.0 seconds.
--secondary-time=FLOAT
Time to hold the primary mouse button before a simulated secondary click is performed. Range: 0.5 - 3.0 seconds.
-m, --dwell-mode=STRING
Select a dwelling mode. Available arguments are: window, gesture
WINDOW
Select the active click type from a window or a panel applet.
GESTURE
Perform clicks by moving in different directions after the cursor changes its shape.
-c, --show-ctw
Show the click-type window. Only useful in combination with dwell-mode=window.
-x, --ctw-x=INT
X Position of the click-type window on screen.
-y, --ctw-y=INT
Y Position of the click-type window on screen.
-t, --threshold=INT
Ignore small pointer movements. Range 0 - 30 pixels.
-s, --shutdown
Stop the mousetweaks daemon.
--disable-animation
Disable cursor animations. The animation shows the timer progress for dwell clicks and secondary clicks as cursor overlay.
--daemonize
Start mousetweaks in the background, ie. spawn a child process.
--login
Start mousetweaks in login mode. In login mode, mousetweaks does not check whether AT-SPI is running.
FILES
~/.mousetweaks.pid
The daemon creates a lock file in the users home directory to keep track of its status.
BUGS
Report bugs to <http://bugzilla.gnome.org/> <http://bugzilla.gnome.org/>
AUTHORS
mousetweaks was written by Gerd Kohlberger
LICENSE
Licenced under the GNU General Public License v3 or later.
SEE ALSO dwell-click-applet(1), pointer-capture-applet(1), Assistive Technology Service Provider Interface (AT-SPI)
mousetweaks(1)