Tagged Questions
2
votes
1answer
74 views
Change the default shell to Python
If I changed my default shell from BASH to Python3 or IPython, would my Linux system have issues or produce errors?
3
votes
2answers
136 views
Wait for a X window to appear/disappear (in a sane way)
Inside a shell script, I need to wait for a window that has a string on its title to appear, do some action, and then wait for it to disappear, and do some other action.
Until yesterday, I had this ...
2
votes
1answer
47 views
process continous output of synclient
I am using synclient to track the position of finger on the touchpad.
I use the following command.
synclient -m 100 | awk '{print $2,$3}'
This command gives the 'x' and 'y' co-ordinate on the ...
1
vote
1answer
146 views
Safely convert unicode strings to printable characters
I have many HTML files containing mixed unicode strings like \303\243 and printable characters like %s. What I'd like to do is converting the unicode strings into printable characters in a safe way.
...
1
vote
3answers
194 views
I want to run commands like make, make install, python setup install without changing directories
I have written a script which will download software from the internet to the current user's home directory and then untar it. And then I have to make and make install it and in some software I have ...
1
vote
3answers
654 views
How to run a Python script in Makefile
I want to write a Makefile to find specific files and run a Python script on each file. The Python script accepts sys.stdin input.
find $(W)/$(OVE) -name "*.xml" -print | \
while read x ; do \
cat ...
3
votes
2answers
835 views
Sending the output from 'dd' to awk/sed/grep
I'm trying to approximate the computer's write speed using dd:
dd if=/dev/urandom of=/dev/null bs=1K count=10000
which gives the following output
10000+0 records in
10000+0 records out
10240000 ...
1
vote
3answers
2k views
How to change the working directory for a shell script
I have a Python script that looks files up in a relative directory. For example: the Python script is in /home/username/projectname/. I have a file that is being called within the Python script that ...
2
votes
1answer
171 views
Key-binding to open a terminal running python in ratpoison
In my .ratpoisonrc file I'm failing to write a key-binding to open a terminal running python. I'm running a minimal Debian setup on which I basically just run emacs. Sometimes I want to just get a ...
2
votes
2answers
1k views
How to execute this particular shell command from Python?
OK, so, I have this non-functional shell script, which I am rewriting piece by piece in python, except I am getting an "unexpected "|" error" from the shell (see below):
#/bin/sh
LINES=`cat $@ | wc ...
0
votes
0answers
199 views
python error using an executable with Z shell
I'm getting this error from the Unix Z shell (I'm on Mac):
python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...
9
votes
2answers
643 views
How to manage huge amount of files in shell?
$ ls
./dir_with_huge_amount_of_files/errors/
Suppose a directory is full of pictures with unix timestamps, I mean a lot measured in many GBs or even more. Shell-commands like ls will get ...