Sponsored Content
Full Discussion: Need good solution
Top Forums Shell Programming and Scripting Need good solution Post 302260499 by elbrand on Thursday 20th of November 2008 06:01:13 PM
Old 11-20-2008
Need good slotuion

Code:
#! /bin/bash

TD=$(mktemp -d /tmp/xxxxxxxxx)
ALL="${TD}/allfiles"
REP=<Reporting system command>
trap "rm -Rf ${TD}" 0 1 2 3 9 13 15

cd ${TD}
find /etc -type f > ${ALL}
split -l 100 ${ALL} "prfx-"
find . -name "prfx-*" -exec ${REP} {} \;

exit 0

 

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need an urgent solution

Hi guys , I think i have completely lost touch with awk ... but now i need it deseparatly ... my problem is for each line in the line i have to check if the first 2 charactes are 'A4' and if they are 'A4' then cut the characters from position 11-16 from that line ... In the meantime i... (1 Reply)
Discussion started by: myelvis
1 Replies

2. Shell Programming and Scripting

need the solution

Write a program to print all prime numbers from 1 to 300. (3 Replies)
Discussion started by: paniruddha
3 Replies
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 an environment as possible, removing most environment variables and with the 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 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 com- mand. 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)
All times are GMT -4. The time now is 08:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy