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 ...
Gravesend asked 28/1, 2015 at 20:1

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...
Budding asked 7/5, 2011 at 1:16

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...
Suck asked 31/8, 2014 at 9:12

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 %,...
Pesky asked 8/8, 2014 at 20:7

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...
Brian asked 10/8, 2013 at 3:25

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...
Nicobarese asked 9/6, 2010 at 11:44

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 ...
Arc asked 7/10, 2011 at 20:46

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...
Funk asked 19/7, 2012 at 16:41

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...
Stereophonic asked 12/6, 2012 at 20:3

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...
Technics asked 1/3, 2012 at 16:44

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 ...
Siderostat asked 21/1, 2012 at 18:7

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...
Raceme asked 7/4, 2011 at 18:11

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...
Mckenzie asked 16/3, 2011 at 22:0

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

I am trying to implement a linux shell that supports piping. I have already done simple commands, commands running in background, redirections, but piping is still missing. I have already read abo...
Batruk asked 17/4, 2010 at 18:59

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 ...
Conversion asked 7/11, 2009 at 22:48

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 ...
Bistort asked 21/1, 2009 at 20:20

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...
Armyn asked 12/12, 2008 at 16:18

© 2022 - 2024 — McMap. All rights reserved.