07-10-2013
Hi DGPickett...
A pleasant surprise seeing a reply...
The array idea has already been suggested and I will be working on it again soon...
(See the original post... )
This was just my preliminary attempt to show I was still working on the AudioScope.sh.
This is needed for polarity of a DC component and Corona688 reminding me of chopping
the DC component will be the level.
I am struggling to get the whole done, with ONLY one mic input, (Macbook Pro 13"), in
much less that 5 seconds.
1) Complete grab and display for the AC component, about 1.5 seconds total.
2) Second grab for the DC polarity, again, if all goes according to plan, about 1.5 seconds.
3) Third similar to 1) but averaging the maximums and then the minimums to get the DC
level; time taken is anyones guess...
If all of this makes sense...
Finally, probably a full speed grab, (48000 HZ), for a real frequency count to be part of
the Scope per-se...
Still in the process of doing kids level HW for it...
LBNL, many thanks for your input. You pros have been an enormous help to my learning
of shell scripting. I view all replies as there are some very useful bits that interest me...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Made changes to a file using vi editor and saved those changes
now realised that the changes are not required
How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Discussion started by: novice100
3 Replies
2. Shell Programming and Scripting
I have the following
for(( i=1; 1<=2; i++))
do
e1=123 n1=123
e2=456 n2=456
coord= $e1,$n1
echo "coordinate=$coord"
done
exit
this echos
coordinate=123,123
I need it to loop so:
loop1
coord=$e1,$n1
loop2 (3 Replies)
Discussion started by: gazz1982
3 Replies
3. Shell Programming and Scripting
Hi,
I want to modify a filename in AIX by attaching the last modified timestamp. I want the timestamp completely in numerical format (eg:200905081210. yr-2009, mnth - 05, date -08, hr - 12, mins - 10).
For example if the filename is a.log and it was modified on April 6th 2008 at 21.00. I... (16 Replies)
Discussion started by: Ruks
16 Replies
4. Shell Programming and Scripting
Hi,
I need some help.
Shell script counter. i need to add condition to check if counter is more than 10 and longer than 3 hours? it runs every 5 mins. it only check count and send email right now.
it runs in cron as below
gregcount.ksh gregdb 10 > /tmp/gregcount.out 2> /tmp/gregcount.err
... (1 Reply)
Discussion started by: pega
1 Replies
5. Shell Programming and Scripting
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Discussion started by: natalie23
3 Replies
6. Shell Programming and Scripting
Hi,
I am new to shell script. I want to count to Delimiter count for my source file. For that I have written script. When I tried to execute the script I could not able to view the results. It throws errors. I don't know what the problem is. My aim is I want to store the delimiter count in one... (4 Replies)
Discussion started by: suresh01_apk
4 Replies
7. Shell Programming and Scripting
if ;then
echo "mrnet greater 5000"
gzip /var/log/mrnet.log
mv /var/log/mrnet.log.gz /var/log/mrnet.log.1.gz
if ];then
i=1
let i++
mv /var/log/mrnet.log.1.gz /var/log/vieux-logs/mrnet.log.$i.gz
else
echo "theres no... (1 Reply)
Discussion started by: Froob
1 Replies
8. UNIX for Dummies Questions & Answers
Hi Experts,
I am in need for some help. My competence level on unix is not at all helping me to resolve this. Please help.
My Input for a system command is as under:
Counters are getting pegged each hour. I need to have a difference printed rather than pegged counter values.
Counter... (2 Replies)
Discussion started by: vanand420
2 Replies
9. UNIX for Dummies Questions & Answers
I had to stop a pigz (parallel gzip) compression before it completed. Is the original uncompressed file changed/corrupted?
I was under the impression that the original file is not changed during compression, though it is deleted if the compression is successful. (1 Reply)
Discussion started by: colin123
1 Replies
10. Shell Programming and Scripting
hello
this script should show all users and space they used without problem :
ls /home >> /root/users.txt
cat /root/users.txt | while read line; do
space=`du -s /home/$line`
echo "$line space is $space"
shift
done
but when i remove pipe ,script run without any output:
ls /home... (4 Replies)
Discussion started by: nimafire
4 Replies
grab(n) Tk Built-In Commands grab(n)
__________________________________________________________________________________________________________________________________________________
NAME
grab - Confine pointer and keyboard events to a window sub-tree
SYNOPSIS
grab ?-global? window
grab option ?arg arg ...?
_________________________________________________________________
DESCRIPTION
This command implements simple pointer and keyboard grabs for Tk. Tk's grabs are different than the grabs described in the Xlib documenta-
tion. When a grab is set for a particular window, Tk restricts all pointer events to the grab window and its descendants in Tk's window
hierarchy. Whenever the pointer is within the grab window's subtree, the pointer will behave exactly the same as if there had been no grab
at all and all events will be reported in the normal fashion. When the pointer is outside window's tree, button presses and releases and
mouse motion events are reported to window, and window entry and window exit events are ignored. The grab subtree ``owns'' the pointer:
windows outside the grab subtree will be visible on the screen but they will be insensitive until the grab is released. The tree of win-
dows underneath the grab window can include top-level windows, in which case all of those top-level windows and their descendants will con-
tinue to receive mouse events during the grab.
Two forms of grabs are possible: local and global. A local grab affects only the grabbing application: events will be reported to other
applications as if the grab had never occurred. Grabs are local by default. A global grab locks out all applications on the screen, so
that only the given subtree of the grabbing application will be sensitive to pointer events (mouse button presses, mouse button releases,
pointer motions, window entries, and window exits). During global grabs the window manager will not receive pointer events either.
During local grabs, keyboard events (key presses and key releases) are delivered as usual: the window manager controls which application
receives keyboard events, and if they are sent to any window in the grabbing application then they are redirected to the focus window.
During a global grab Tk grabs the keyboard so that all keyboard events are always sent to the grabbing application. The focus command is
still used to determine which window in the application receives the keyboard events. The keyboard grab is released when the grab is
released.
Grabs apply to particular displays. If an application has windows on multiple displays then it can establish a separate grab on each dis-
play. The grab on a particular display affects only the windows on that display. It is possible for different applications on a single
display to have simultaneous local grabs, but only one application can have a global grab on a given display at once.
The grab command can take any of the following forms:
grab ?-global? window
Same as grab set, described below.
grab current ?window?
If window is specified, returns the name of the current grab window in this application for window's display, or an empty string if
there is no such window. If window is omitted, the command returns a list whose elements are all of the windows grabbed by this
application for all displays, or an empty string if the application has no grabs.
grab release window
Releases the grab on window if there is one, otherwise does nothing. Returns an empty string.
grab set ?-global? window
Sets a grab on window. If -global is specified then the grab is global, otherwise it is local. If a grab was already in effect for
this application on window's display then it is automatically released. If there is already a grab on window and it has the same
global/local form as the requested grab, then the command does nothing. Returns an empty string.
grab status window
Returns none if no grab is currently set on window, local if a local grab is set on window, and global if a global grab is set.
BUGS
It took an incredibly complex and gross implementation to produce the simple grab effect described above. Given the current implementa-
tion, it isn't safe for applications to use the Xlib grab facilities at all except through the Tk grab procedures. If applications try to
manipulate X's grab mechanisms directly, things will probably break.
If a single process is managing several different Tk applications, only one of those applications can have a local grab for a given display
at any given time. If the applications are in different processes, this restriction doesn't exist.
KEYWORDS
grab, keyboard events, pointer events, window
Tk grab(n)