I need to have an if statement in a script to run if there are certain processes running. Easiest way I can see to do this is to run a ps and grep the results based on what I am looking for:
$ ps -ef | grep wtrs
---
webtrend 5046 1 0 May 12 ? 0:28 /webtrends/versions/6.1/wtrs_ui... (6 Replies)
Hello, I am new to scripting and need some help. In looking at other posts on this forum, I came up with the following logic. I cannot figure out why I am getting names of files of the current directory in my echo output.
Scenario: message file has a line containing the version. Version.txt... (2 Replies)
Hi,
As I have seen in this forum how to comment multiple lines in the script, but it does not work properly for me.
It is blocking the code but it does not execute the rest of the codes.
This is my code
#! /usr/bin/ksh
month='date +"m%"'
: << Comments Block
if ||
then
echo "inc =... (12 Replies)
I have a command (not shell script) that general several lines of output like this...
scp /var/lib/mysql/jitu/email.* root@172.29.0.218:/root/pitu/
scp /var/lib/mysql/jitu/orders.* root@172.29.0.218:/root/pitu/
I tried adding xargs but it did not work. -exec was not tried because I guess it... (3 Replies)
could someone write a short script which is able to take a text file input and compare lines 1 and 2, 3 and 4, 5 and 6 ... ... until the end of the file. And to prompt if the lines are not equal.
Thank you! (10 Replies)
Here in the input file
23:59:13,devicename,21,server1,700
23:59:13,devicename,22,server2,200
23:59:13,devicename,23,server3,200
23:59:13,devicename,24,server4,200
23:59:13,devicename,25,server5,200
23:59:13,devicename,26,server6,200
23:59:13,devicename,27,server7,200... (6 Replies)
I'm working on a script that needs to execute only after directory B is equal in file count to directory A.
It needs to check dir B every 5 min or so and when the file count is equal to A, it executes a script.
I'm thinking of using wc -w but I'm not sure how to put it together.
Any help... (7 Replies)
I have 2 files with exactly the same information (with header and separated by ";") and what I would like to do is print (for both files!) the columns that are different and also print the "key" column that is equal in the 2 files For example, if
File1:
key1;aaa;bbb;ccc
key2;ddd;eee;fff... (4 Replies)
I have two files
I need to compare these two files and take the lines that are common in both the files and consider the line present in second file for my further processing
I have used "Awk" along with "FNR and NR" but that is not working
gawk -F= '
> FNR==NR {a=$1; next};
> ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
LEARN ABOUT XFREE86
chdist
CHDIST(1)CHDIST(1)NAME
chdist - script to easily play with several distributions
SYNOPSIS
chdist [options] [command] [command parameters]
DESCRIPTION
chdist is a rewrite of what used to be known as 'MultiDistroTools' (or mdt). Its use is to create 'APT trees' for several distributions,
making it easy to query the status of packages in other distribution without using chroots, for instance.
OPTIONS -h, --help
Provide a usage message.
-d, --data-dir DIR
Choose data directory (default: $HOME/.chdist/).
-a, --arch ARCH
Choose architecture (default: `dpkg --print-architecture`).
--version
Display version information.
COMMANDS
create DIST [URL RELEASE SECTIONS]
Prepare a new tree named DIST
apt-get DIST <update|source|...>
Run apt-get inside DIST
apt-cache DIST <show|showsrc|...>
Run apt-cache inside DIST
apt-rdepends DIST [...]
Run apt-rdepends inside DIST
src2bin DIST SRCPKG
List binary packages for SRCPKG in DIST
bin2src DIST BINPKG
List source package for BINPKG in DIST
compare-packages DIST1 DIST2 [DIST3, ...]
compare-bin-packages DIST1 DIST2 [DIST3, ...]
List versions of packages in several DISTributions
compare-versions DIST1 DIST2
compare-bin-versions DIST1 DIST2
Same as compare-packages/compare-bin-packages, but also runs dpkg --compare-versions and display where the package is newer.
compare-src-bin-packages DIST
Compare sources and binaries for DIST
compare-src-bin-versions DIST
Same as compare-src-bin-packages, but also run dpkg --compare-versions and display where the package is newer
grep-dctrl-packages DIST [...]
Run grep-dctrl on *_Packages inside DIST
grep-dctrl-sources DIST [...]
Run grep-dctrl on *_Sources inside DIST
list
List available DISTs
COPYRIGHT
This program is copyright 2007 by Lucas Nussbaum and Luk Claes. This program comes with ABSOLUTELY NO WARRANTY.
It is licensed under the terms of the GPL, either version 2 of the License, or (at your option) any later version.
Debian Utilities 2013-12-23 CHDIST(1)