04-03-2020
Manipulate o/p of a Linux command
Hi All,
I am having a heck of a time.
I have runaway processes that are hanging my rpm databases, and I have to issue kill commands.
Presently, I am outputting to a tmp file and manually putting in the kill command. but would like to automate it by the process id.
So, right now I am doing a pgrep -l rpm >/tmp/rpm
the o/p is
302 rpm
305 rpm
313 rpm
with about 9,000 processes behind it.
I would like it to be kill 302 305 313, etc.
if that is not possible.
kill 302
kill 305
etc.
any help would be appreciated.
thanks
gary
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everybody:
I have a problem. I have a output files which have this pattern:
number1
--space
block1a - 7rows/10columns/65elements
--space
block1b - 7rows/10columns/65elements
--space
block1c - 7rows/10columns/65elements
--space
number2
--space
block2a - 7rows/10columns/65elements... (0 Replies)
Discussion started by: tonet
0 Replies
2. Shell Programming and Scripting
Hi, Im very new to the world of sed so I'm really not even sure if this is possible. What i need to do is read from a flat file and every time i see this line:
VAL=123,456
I need to change 456 to 457 for every occurence of this line in the file. The numbers 123 and 456 are different for... (6 Replies)
Discussion started by: LT_2008
6 Replies
3. Shell Programming and Scripting
Hi All,
I am spooling the data some sql queries into a single file but wanted to know how to format the data of the file generated by spool.
#!/bin/sh
unset -f USAGE
USAGE () {
clear
echo "############################USAGE#######################\n"
echo "Incorrect number of... (2 Replies)
Discussion started by: ss_ss
2 Replies
4. Programming
Hello,
I need help on how to "access" or manipulate the Linux ARP Cache in C, here is the description of the project i'm working in:
There are a lot of tools that analize ARP frames and send an e-mail to the sysadmin, that's easy. What i want to do is to inspect every ARP frame that arrives... (18 Replies)
Discussion started by: semash!
18 Replies
5. Shell Programming and Scripting
Hi,
I am new to awk/unix and am trying to put together a script to manipulate the date column in a csv file.
I have file1.csv with the following contents:
Date,ID,Number,Amount,Volume,Size
01-Apr-2014,WERFG,998,105873.96,10873.96,1342.11
01-Apr-2014,POYFR,267,5681.44,5681.44,462.96
I... (2 Replies)
Discussion started by: Prit Siv
2 Replies
6. Shell Programming and Scripting
Hi, I am new to awk and unix programming and trying to manipulate a csv file.
My current csv file looks like this:
col1,col2,col3,col4,col5,col4,col5,col6,col7,col8
223,V,c,2,4,f,r,,y,z
223,V,c,3,2,f,r,,y,z
223,V,c,1,4,f,r,,y,z
223,V,c,4,3,f,r,,y,z
227,V,c,3,1,f,r,,y,z... (8 Replies)
Discussion started by: Prit Siv
8 Replies
7. UNIX for Beginners Questions & Answers
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
LEARN ABOUT CENTOS
makedeltarpm
MAKEDELTARPM(8) System Manager's Manual MAKEDELTARPM(8)
NAME
makedeltarpm - create a deltarpm from two rpms
SYNOPSIS
makedeltarpm [-v] [-V version] [-z compression] [-m mbytes] [-s seqfile] [-r] [-u] oldrpm newrpm deltarpm
makedeltarpm [-v] [-V version] [-z compression] [-s seqfile] [-u] -p oldrpmprint oldpatchrpm oldrpm newrpm deltarpm
DESCRIPTION
makedeltarpm creates a deltarpm from two rpms. The deltarpm can later be used to recreate the new rpm from either filesystem data or the
old rpm. Use the -v option to make makedeltarpm more verbose about its work (use it twice to make it even more verbose).
If you want to create a smaller and faster to combine "rpm-only" deltarpm which does not work with filesystem data, specify the -r option.
makedeltarpm normally produces a V3 format deltarpm, use the -V option to specify a different version if desired. The -z option can be used
to specify a different compression method, the default is to use the same compression method as used in the new rpm.
The -s option makes makedeltarpm write out the sequence id to the specified file seqfile.
If you also use patch rpms you should use the -p option to specify the rpm-print of oldrpm and the created patch rpm. This option tells
makedeltarpm to exclude the files that were not included in the patch rpm but are not byteswise identical to the ones in oldrpm.
makedeltarpm can also create an "identity" deltarpm by adding the -u switch. In this case only one rpm has to be specified. An identity
deltarpm can be useful to just replace the signature header of a rpm or to reconstruct a rpm from the filesystem.
MEMORY CONSIDERATIONS
makedeltarpm normally needs about three to four times the size of the rpm's uncompressed payload. You can use the -m option to enable a
sliding block algorithm that needs mbytes megabytes of memory. This trades memory usage with the size of the created deltarpm. Furthermore,
the uncompressed deltarpm payload is currently also stored in memory when this option is used, but it tends to be small in most cases.
SEE ALSO
applydeltarpm(8) combinedeltarpm(8)
AUTHOR
Michael Schroeder <mls@suse.de>
Jul 2010 MAKEDELTARPM(8)