09-22-2009
Thanks very much - that's exactly what I wanted to do.
I have subsequently worked out I can achieve the same result with 'killall -9 -ir evol*' which is briefer. However, your answer addresses the underlying question I had of how to get a the listed (piped) results to be loped through.
Thanks very much!!!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
My question is can you use the pipe more than one time in the same command line? By the way I am new to UNIX. Thanks in advanced! (3 Replies)
Discussion started by: elkoreanopr
3 Replies
2. Shell Programming and Scripting
how do you pipe the results to next statement as argument?
somecommand | grep $result somefile
how do you reference $result with?? (12 Replies)
Discussion started by: convenientstore
12 Replies
3. Programming
Hello everybody.I want to make clear that i am not going to ask from anybody to build my asignement but i have a big problem. I can't seem to find anywhere ONE good example on C about what i am trying to do:wall:.I think it is simple. All i ask is one example, even a link is fine.
So, i want to... (1 Reply)
Discussion started by: Cuervo
1 Replies
4. Shell Programming and Scripting
Hello,
I am trying to make a bash script that can pull data from a file and then change one part of said data.
I want to search by username and pull the full line. That way there is a way to replace just one part of that line then return it back to the file.
My Data is stored like:
... (1 Reply)
Discussion started by: serverfull
1 Replies
5. Shell Programming and Scripting
Guy's,
I need help with creating a pipe, I found this code online but not exactly sure what different parts are doing.
Will someone be able to help me with explaining what code is doing?
Also what I want is to have everything the same directory. Meaning I am working in directory:
I want... (5 Replies)
Discussion started by: INHF
5 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to write a script that checks gvfs to see if a mount exists so I can run it from network-manager's status hooks. I thought I'd pipe the output of gvfs-mount -l to grep for the particular mounts I care about. When I do this in a bash script:
cmnd="gvfs-mount -l | grep -i... (4 Replies)
Discussion started by: kcstrom
4 Replies
7. UNIX for Dummies Questions & Answers
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
Discussion started by: jcdole
1 Replies
8. Shell Programming and Scripting
Hi all,
Am trying to convert a script from ksh to bash :wall:. One of the sub is something like below:
#!/bin/bash
declare -a array01
step_01_test()
{
local count=0
ps -ef | grep watch | grep -v grep | awk '{ print $8 }' | while read line
do
let count=${count}+1
... (1 Reply)
Discussion started by: newbie_01
1 Replies
9. UNIX for Advanced & Expert Users
Heays
So i have that script to which i'd like to pipe (rather than just regular arguments) some data from another virtual output command.
Simplified:
echo * | script.sh
When i know how many args i expect, i can handle this simple by:
&& \
read ONE TWO && \
set ONE TWO
echo "$1 : $2... (7 Replies)
Discussion started by: sea
7 Replies
10. Shell Programming and Scripting
What is the proper way to run two bash loops in the same command? The two below loops run separately, the problem is when I pipe them I get an error that the file used for the second loop does not exist. I am not sure how to wait for the first loop to complete and then start the second. Thank... (10 Replies)
Discussion started by: cmccabe
10 Replies
LEARN ABOUT MOJAVE
io::pipe5.18
IO::Pipe(3pm) Perl Programmers Reference Guide IO::Pipe(3pm)
NAME
IO::Pipe - supply object methods for pipes
SYNOPSIS
use IO::Pipe;
$pipe = IO::Pipe->new();
if($pid = fork()) { # Parent
$pipe->reader();
while(<$pipe>) {
...
}
}
elsif(defined $pid) { # Child
$pipe->writer();
print $pipe ...
}
or
$pipe = IO::Pipe->new();
$pipe->reader(qw(ls -l));
while(<$pipe>) {
...
}
DESCRIPTION
"IO::Pipe" provides an interface to creating pipes between processes.
CONSTRUCTOR
new ( [READER, WRITER] )
Creates an "IO::Pipe", which is a reference to a newly created symbol (see the "Symbol" package). "IO::Pipe::new" optionally takes two
arguments, which should be objects blessed into "IO::Handle", or a subclass thereof. These two objects will be used for the system call
to "pipe". If no arguments are given then method "handles" is called on the new "IO::Pipe" object.
These two handles are held in the array part of the GLOB until either "reader" or "writer" is called.
METHODS
reader ([ARGS])
The object is re-blessed into a sub-class of "IO::Handle", and becomes a handle at the reading end of the pipe. If "ARGS" are given
then "fork" is called and "ARGS" are passed to exec.
writer ([ARGS])
The object is re-blessed into a sub-class of "IO::Handle", and becomes a handle at the writing end of the pipe. If "ARGS" are given
then "fork" is called and "ARGS" are passed to exec.
handles ()
This method is called during construction by "IO::Pipe::new" on the newly created "IO::Pipe" object. It returns an array of two objects
blessed into "IO::Pipe::End", or a subclass thereof.
SEE ALSO
IO::Handle
AUTHOR
Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to <perlbug@perl.org>.
COPYRIGHT
Copyright (c) 1996-8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
perl v5.18.2 2013-11-04 IO::Pipe(3pm)