10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm trying avoid having a large number of 'if' statements in my script by setting up a variable within 'ksh' which can be expanded depending on parameters passed to the script. The output from the 'cat' command should be able pipe its output into any additional commands on the command line... (4 Replies)
Discussion started by: stv_t
4 Replies
2. Programming
Hello all, I am trying to learn more about programming Unix pipes in C.
I have created a pipe that does od -bc < myfile | head
Now, I am trying to create od -bc < myfile | head | wc
Here is my code, and I know I might be off, thats why I am here so I can get some clarification.
#include... (1 Reply)
Discussion started by: petrca
1 Replies
3. Shell Programming and Scripting
Hi,
thanks for b4. can anyone tell me why following not working:
noUsers=$(who | cut -d" " -f1 | wc -l)
What i'm trying to do is get a list of logged on users and pass it to 'wc -l' and store the output to a variable. Any ideas? (1 Reply)
Discussion started by: Furqan_79
1 Replies
4. Shell Programming and Scripting
I have to add pipes for particualr number of records in a file. For eg the file has 10 records and i need to add the "|" for records numbers 7 to 10 at particular positons as shown.
I need to add pipes in each of these records at positions 9, 11,,21 as like below.
Can some body... (7 Replies)
Discussion started by: dsravan
7 Replies
5. UNIX for Advanced & Expert Users
This is something I've given a lot of thought to and come up with no answer.
Say you have a data stream passing from a file, through process A, into process B. Process A only modifies a few bytes of the stream, then prints the rest of the stream unmodified. Is there any way to stream the file... (4 Replies)
Discussion started by: Corona688
4 Replies
6. UNIX for Advanced & Expert Users
Hi...Can anyone please guide me on FIFO Pipes in UNIX.I have lerant things like creating fifo pipes,using them for reads and writes etc.I want to know what is the maximum amount of memory that such a pipe may have? Also can anyone guide me on where to get info on this topic from? (4 Replies)
Discussion started by: tej.buch
4 Replies
7. UNIX for Dummies Questions & Answers
What is the difference between:
cd /tmp
tar -cf - *.txt |gzip > tmp_txt.tar.gz
and
cd /tmp
mknod pipe p
gzip < pipe > /tmp/tmp_txt1.tar.gz &
tar -cf pipe *.txt
Apart from the fact that we have to create the pipe file manually, is there any difference in the performance of the two?... (5 Replies)
Discussion started by: blowtorch
5 Replies
8. Programming
heya
got a small problem here. im trying to pipe eg: 'ls | more'.
i have created a command line parser which separates ls and more into two commands. i have also created a struct, each struct has a command name, number of arguments, redirect_in, redirect_out, pipe_in, etc etc.... eg:
struct... (0 Replies)
Discussion started by: mile1982
0 Replies
9. Shell Programming and Scripting
Hi,
Can the cd command be invoked using pipes???
My actual question is slightly different. I am trying to run an executable from different folders and the path of these folders are obtained dynamically from the front end. Is there a way in which i can actually run the executable... (2 Replies)
Discussion started by: Sinbad
2 Replies
10. Filesystems, Disks and Memory
Hello!
How I can increase or decrease predefined pipe buffer size?
System FreeBSD 4.9 and RedHat Linux 9.0
Thanks! (1 Reply)
Discussion started by: Jus
1 Replies