piping Questions
1
Solved
Getting into bash, I love it, but it seems there are lots of subtleties that end up making a big difference in functionality, and whatnot, anyway here is my question:
I know this works:
total=0
...
4
public class ReadInput {
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String x = null;
while( (x = i...
3
Solved
I'm writing my own simple system allowing me to automatically sign APKs before they are uploaded to GPlay. I've got a batch file that does the signing; and a "wrapper" batch file, the content of wh...
Whitfield asked 23/12, 2014 at 14:36
2
Solved
I'm trying to search for lines containing 'foo' but these lines must not contain 'bar'. What's a good way to search with these parameters with ack?
I can do:
ack "foo" | grep -v "bar"
but it doe...
1
Solved
Github developmental version of magrittr includes some cool new function for piping but I do not exactly catch de difference between %>% and %,%. Is this only formal with %>% for value and %,...
2
Solved
I have the line:
find -maxdepth 1 -type f -iname '*key*' -not -name '*~'
I want to extract the contents (which should be text) of all the files returned and pipe that into sort to be sorted alph...
6
Solved
Really simple question, how do I combine echo and cat in the shell, I'm trying to write the contents of a file into another file with a prepended string?
If /tmp/file looks like this:
this is a t...
4
Solved
I've been trying to use the pipe() system call to create a shell that supports piping (with an arbitrary number of commands).
Unfortunately, I haven't had much luck using pipe(). After spending a ...
3
Solved
I've read everything there is on subprocess.Popen but I think I'm missing something.
I need to be able to execute a unix program which reads a data stream from a list created in the python script ...
Ignatia asked 6/8, 2012 at 14:10
3
Solved
I am successfully using find to create a list of all files in the current subdirectory, excluding those in the subdirectory "cache." Here's my first bit of code:
find . -wholename './cach*' -prune...
2
Solved
I've always hated batch and I still do, even for the most simple things I prefer C or PHP/Perl. But this time I could not go without it, ****sigh****.
I wanted to redirect an echo command to an ot...
Storiette asked 25/6, 2012 at 16:52
3
Solved
I noticed today Bash printf has a -v option
-v var assign the output to shell variable VAR rather than
display it on the standard output
If I invoke like this it works
$ printf -v var "Hello w...
1
(Windows)
I wrote some Python code that calls the program SoX (subprocess module), which outputs the progress on STDERR, if you specify it to do so. I want to get the percentage status from the ou...
Select asked 14/4, 2012 at 1:58
3
Solved
I have a Python script that outputs two numbers like so: 1.0 2.0 (that's a space in between the numbers, but it can be a \t, or whatever. I want a bash variable to save the 1.0, and another variabl...
1
Solved
I am able to join and crossfade two audio files using SoX, like so:
sox file1.wav file2.wav outfile.wav splice -q `soxi -D file1.wav`,0.5
where the soxi substitution is fetching the duration of ...
3
Solved
I have a Python script that loads a web page using urllib2.urlopen, does some various magic, and spits out the results using print. We then run the program on Windows like so:
python program.py &g...
Abhorrent asked 6/1, 2012 at 16:48
2
Solved
I am writing a multi-threaded application that mimics a movie theater. Each person involved is its own thread and concurrency must be done completely by semaphores. The only issue I am having is ho...
Subreption asked 9/4, 2011 at 4:36
2
Solved
This is a generic question, and although I'm pretty sure some of it's parts have been answered I want opinions rather than a broad discussion. I intend to do a master thesis on evolutionary computa...
1
Solved
I'm working on an email piping script that needs to save just the reply content and not the original quoted email. I'm using a mime parser class (http://www.phpclasses.org/package/3169-PHP-Decode-M...
1
Solved
I am using the TFS PowerTools Cmdlets in PowerShell to try to get at some information about Changesets and related WorkItems from my server. I have boiled the problem down to behavior I don't under...
Joanajoane asked 24/10, 2010 at 16:33
2
Solved
2
Solved
I'm trying to create a simple shell in C for Unix. I've been able to do all the parsing of commands and execution, but I'm having a problem with piping. I think the problem is that I'm not hooking ...
4
I can run the following command
xwd -root | xwdtopnm | pnmtojpeg > screen.jpg
in a terminal under linux and it will produce a screenshot of my current screen.
I try to do the following with t...
Bcd asked 8/5, 2009 at 10:35
3
Solved
I'm trying something like this
Output.py
print "Hello"
Input.py
greeting = raw_input("Give me the greeting. ")
print "The greeting is:", greeting
At the cmd line
Output.py | Input.py
But ...
3
Solved
I am interested in writing separate program modules that run as independent threads that I could hook together with pipes. The motivation would be that I could write and test each module completely...
© 2022 - 2024 — McMap. All rights reserved.