Help with writing Shell Script to automate process using multiple commands
Hello!
Need help to write a Linux script that can be run from windows using command/Cygwin/any other way. I am new to scripting, actually i am trying to automate server health check like free disk space, memory along with few services status, if any services is not running then start services , clear logs to resolve disk space issue. Script should store default user cgriffin with predefined password. fist check for 7 services then free disk space . If all services running then look for free disk space(if any service is not running then fnd out service whic is not running). Attached are commands thatw e manually run. Anybody who can help to automate this using shell script run using windows machine? Kindly help me
Hi,
I want to call multiple java commands through a .sh file. I have drafted one with my least knowledge. But its not working. Pls help. I am trying to run this from Sun Solaris (OS 5.10) server with 10g oracle database.
echo \* starting script AUTORUN
echo \* get the Monitor path... (4 Replies)
This is my first post so hello to all of you!
I have a script in bash-3.00 that needs to execute the following:
pkgrm (to remove an existing package)
pkgadd -d ( to install a new package)
The problem is that both commands prompt me to answer either y,n or q in order to proceed with... (13 Replies)
can anyone help me in writing a shell script to visualize how simple commands work and on what logic. For Eg: ls command how it lists out all the files and directories, need to write a simple script based on the commands source code.:D (0 Replies)
Can anyone help me out in visualizing on what is the logic behind simple unix commands. For Eg: ls command lists files and directories, how it displays I need to know the source code for commands like this. (1 Reply)
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
Hi,
I am trying to create a shell script to automate the following process of getting svn stats:-
Step1:- cd to checkout location.
Note that the checked code have multiple modules in respective folders
Step2:- Execute this command inside each module:-
svn log -v --xml >... (0 Replies)
Hi,
I am trying to count the number of times a string of letters occurs in a file for multiple unique strings of letters. Right now I can do this one at a time using the following code (in this example I am searching for the string "AAA"):
echo AAA >> outfile.txt
grep -c "AAA" -r... (4 Replies)
Hi, guys, I am trying to automate a sftp process using "expect" method (since the key authentication method is disabled in my company network, there is no helping it).
In order to try, I type in the command manually:
sftp @ > << EOF
>cd
>ls -l
>EOF
>Connecting to
@servername password:
... (3 Replies)
Hi
I have a shell script like that
Main() {
DAY=$(date +"%d-%m-%Y")
TIME=$(date +"%T")
Command 1
Command 2
...
Command n
}
I would like to catch errors from all commands in Main() and write these errors into a file , something likes this:
Main
if < error >
then
echo... (3 Replies)
Hello All!
First post...
I am working on a script that is used to recover a crashed drive from an rsync backup.
I'm down to the place where I need to create all of the directories in /mnt where I will then mount each of the volumes and begin the restore process to each volume...
I have... (3 Replies)
Discussion started by: RogerBaran
3 Replies
LEARN ABOUT MOJAVE
crosspost
CROSSPOST(8) System Manager's Manual CROSSPOST(8)NAME
crosspost - create the links for cross posted articles
SYNOPSIS
crosspost [ -D dir ] [ -s ] [ file... ]
DESCRIPTION
Crosspost reads group and article number data from files or standard input if none are specified. (A single dash in the file list means to
read standard input.) It uses this information to create the hard, or symbolic, links for cross posted articles. Crosspost is designed to
be used by InterNetNews to create the links as the articles come in. Normally innd creates the links but by having crosspost create the
links innd spends less time waiting for disk IO. In this mode one would start innd(8) using the ``-L'' flag.
Crosspost expects input in the form:
group.name/123 group2.name/456 group3.name/789
with one line per article. Any dots in the input are translated into "/" to translate the news group into a pathname. The first field is
assumed to be the name of an existing copy of the article. Crosspost will attempt to link all the subsequent entries to the first using
hard links if possible or symbolic links if that fails.
By default, crosspost processes its input as an INN channel feed written as a ``WR'' entry in the newsfeeds(5) file, for example:
crosspost:*:Tc,Ap,WR:/usr/lib/news/bin/crosspost
To process the history file and re-create all the links for all articles use:
awk <history -F' ' '(NF > 2){print $3}' | crosspost
(where the -F is followed by a tab character.)
The ``-D'' flag can be used to specify where the article spool is stored. The default directory is /var/spool/news.
By default crosspost will fsync(2) each article after updating the links. The ``-s'' flag can be used to prevent this.
HISTORY
Written by Jerry Aguirre <jerry@ATC.Olivetti.Com>.
SEE ALSO newsfeeds(5), innd(8).
CROSSPOST(8)