Search Results

Search: Posts Made By: darwin_886
90,567
Posted By darwin_886
Works great in ubuntu linux with bash...
Works great in ubuntu linux with bash 5.0.3(1)-release. Thanks both!
90,567
Posted By darwin_886
Controlling user input
I'm trying to use a bash script for a psych experiment that involves listening to sound files and responding. If I have something like the code below, how can I make sure that a key press is assigned...
1,981
Posted By darwin_886
Sorry - one other question. Although I can send...
Sorry - one other question. Although I can send the codes to port, it is very slow. I'm not sure why. I tried changing the baud rate but that didn't make any difference.

Not sure if this is...
1,981
Posted By darwin_886
Perfect - thanks!
Perfect - thanks!
1,981
Posted By darwin_886
Shell equivalent of matlab fwrite function
I have some matlab code that sends the serial port elements of an array using matlab's fwrite function, e.g.:
fwrite(s, [170 01 06 06 85], 'uchar');

What would be a unix shell equivalent? E.g.,...
1,411
Posted By darwin_886
Clumsy user input
The (longer) script that I am working on does something like this:
#!/bin/bash

while true
do
clear
sleep 1
shuf -i1-2 -n1
sleep .1
clear
echo "Press 1 if you saw a 1....
1,659
Posted By darwin_886
Thanks a lot!
Thanks a lot!
1,659
Posted By darwin_886
Local minima
I have a file with a single column of numbers. Starting from the 11th line, I'd like to find the line(s) on which the number meets two criteria: 1) it is less than the 10 numbers that precede it, 2)...
2,584
Posted By darwin_886
flashing cursor
I am running a psychology experiment with a UNIX shell script as a front end. This precedes each trial:

echo -e "\n\n\n ***Ready***"
sleep 1
clear

Is there a way to get rid of the flashing...
1,907
Posted By darwin_886
Thanks.
Thanks.
1,907
Posted By darwin_886
Maybe my redirect syntax is wrong? I get no...
Maybe my redirect syntax is wrong? I get no output for

command &> /dev/null | grep foo

I know my grep command is ok - I checked by redirecting to file instead and grepping the file after...
1,907
Posted By darwin_886
beginner redirect question
How can I redirect all stdout and stderr messages from a command to /dev/null (or to a file if need be) except messages that start with the word 'foo'? Messages that start with 'foo' need to be...
1,972
Posted By darwin_886
Awesome - thank you both very much.
Awesome - thank you both very much.
1,972
Posted By darwin_886
sorting question
How can I sort lines in a file in a consistent, user-defined way that is not alphabetical, numeric, or patterned in any other way (e.g., sort a bunch of 5 line files to always print lines 2,5,3,4,1)?...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy