Guys,
I've a problem in the "sed" command used in my shellscripts
This is the problamatic line in my shell script:
sed -e 's/${line1}/${line1_m}/g' prod_hier_1234.txt > test.txt
It doesn't do the job of replacing the string stored in variable 'line1' to 'line1_m'.
However If I replace the... (10 Replies)
Hi all,
I am looking for api to get me system monitoring statictics every 5 minutes.
I am looking at the following statistics:
1. System CPU Usage
2. Process CPU Usage
3. Process Memory Usage
4. I/O Usage for a certain disk.
5. Process I/O bytes/sec utilization.
I have seen very... (2 Replies)
I wanna put a LDAP search command into a script and there I have the following problem.
I have these variables in a bash script
com="ldapsearch -LLL -x -W"
node=" -b 'o=me,ou=addressbook,dc=subdomain,dc=dyndns,dc=org'"
uri=" -H ldaps://subdomain.dyndns.org"
user=" -D... (2 Replies)
Hi Guru's,
I 'm trying to execute the below given script in Unix. I am having an issue with the script. The output of the script is given below:
#!/bin/bash
File_Home="/home/essftp/Risk"
cd /home/essftp/Risk
rm -f FileList
rm -f credit_risk*
file1=`ls -lt... (4 Replies)
hello,
i'm having some performance problem on one of my linux machines and i hope someone will be able to help me analyzing the problem.
machine info:
Linux fedora, cpu x 4 cores of 1.6Ghz, 8G memory, 8G swap.
i've enabled sar on my machine and created a graph using ksar utility for... (15 Replies)
Hi all,
Very new to shell scripting so appreciate some help!
There is a process count that I need to monitor, I have the AIX command that gives this value and I've cleaned it up with grep/awk so it only spits out the value I'm interested in:
echo "psc -i 10050 -s RELOAD_SERVICE" | tmadmin... (14 Replies)
#!/bin/sh
date=`date +%y%m%d -d"1 day ago"`
inbound_dir=/vis/logfiles/to_solmis
cp `grep -il ST~856~ $inbound_dir/*$date*` /vis/sumit/in_ASN/
echo 'SENDER,RECEIVER,DATE,TIME,ASNUMBER' > a.csv
for i in /vis/sumit/in_ASN/*
do
... (8 Replies)
Hi,
I have used expr command to increment the date.
for e.g.,
case 1 :
echo $(date -d $(echo `expr 20010101 + 1`))
it returns
Tue Jan 2 00:00:00 IST 2001
case 2:
echo $(date -d $(echo `expr 20010101 - 1`))
it returns
date: invalid date `20010100'
please suggest me, how to... (3 Replies)
Dear gurus of Linux / Unix.
I have a server, which I use to monitoring traffic, the problem that I find is when I run the following command:
probe:~ # sar -n DEV 1
I see that I one second appear info in some interface and in the other second no appear, I don't know what will be the... (0 Replies)
This morning we had an activity on our Nagios server, whereby we inserted new disks into the server, and rebooted the server.
The disk implementation failed, therefore we had to revoke the changes, and rebooted the server once again.
The server was up and running at 6:00 am this morning.... (2 Replies)
Discussion started by: anaigini45
2 Replies
LEARN ABOUT LINUX
service
service(8) System Manager's Manual service(8)NAME
service - run a System V init script
SYNOPSIS
service SCRIPT COMMAND [OPTIONS]
service --status-all
service --help | -h | --version
DESCRIPTION
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working
directory set to /.
The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the
invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and
stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start
command.
service --status-all runs all init scripts, in alphabetical order, with the status command.
EXIT CODES
service calls the init script and returns the status returned by it.
FILES
/etc/init.d
The directory containing System V init scripts.
ENVIRONMENT
LANG, TERM
The only environment variables passed to the init scripts.
SEE ALSO
/etc/init.d/skeleton,
update-rc.d(8),
init(8),
invoke-rc.d(8).
Jan 2006 service(8)