04-13-2011
help needed with a small shell script!
Thanks for the reply..
yes the names would be the same, I have just given the names for an example..
these are log files and i might be needing a max of 3 files.
I wud try this and update...Thanks a ton
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have the following columns in my input file which is sorted on ColA
colA colB colC colD colE
The data is such that for a single colA it can have multiple values of other columns, for eg the data can be
colA colB colC ... (1 Reply)
Discussion started by: nvuradi
1 Replies
2. Shell Programming and Scripting
Hi All,
this small script is written to recognize user input character.. it is in small case .. upeer case or is a number... but when i input first capital letter say A.. it always gives small character.... what is the problem.
#!/bin/bash
echo "Enter the character"
read a
case $a in
)... (2 Replies)
Discussion started by: johnray31
2 Replies
3. Shell Programming and Scripting
The following Script takes each extension and determine what category it
belongs and then moves it into a directory based on the extension.
(for eg. 1.sh, 5.sh, 9.sh together; 4.csh, 120.csh, 6.csh together and 7.ksh, 2.ksh, 59.ksh together) and moves them to their respective directories viz.... (2 Replies)
Discussion started by: marconi
2 Replies
4. Shell Programming and Scripting
Hi Guys,
Please can some one explain me the below part of code. In this code what is the use of the line in Bold.
COPY=0
if ; then
echo "$CONF exists and is non-empty - backing it up"
SUFFIX=`date +%Y%m%d%H%M%S`
echo "cp -p $CONF $CONF.$SUFFIX"
cp -p $CONF... (4 Replies)
Discussion started by: max29583
4 Replies
5. Shell Programming and Scripting
Hi Buddies,
The following is shell scripts which was borrowed from linux box for load average check. it runs good.
(this structure is simple, when load average is too high, it will send alert to user)
#!/usr/bin/ksh
# Set threshold for 1, 5 and 15 minture load avarage
# configured for... (4 Replies)
Discussion started by: GreatJerry
4 Replies
6. Shell Programming and Scripting
Hello Forum members,
Have a nice day.
I have to write a script for the following below scenario.
There are 3 applications located in home directory(ie xyz/app) which have multiple directories and files of diff format(.sh,log,other formats).
Case 1: I have to find the hardcoded... (8 Replies)
Discussion started by: rajkumar_g
8 Replies
7. Shell Programming and Scripting
I have a file test.txt and i need to grep pattern "A.17" from that file.
I know cat test.txt | grep A.17 will return the pattern, but it is returing like
# VERSION=A.17
How can i take only A.17 from this
if A.17 is found,
... do something
if not found
... do something
Please... (11 Replies)
Discussion started by: Renjesh
11 Replies
8. Shell Programming and Scripting
Hi,
I wanted to know can a custom script can be made available to run in
postroate
endscript
something like
postrotate
./scriptpath/sh-script.sh
endscript
Is this the correct syntax, or it will require any modification?
Thanks in Advance.
Neeryan (1 Reply)
Discussion started by: Neeryan
1 Replies
9. Shell Programming and Scripting
I need help writing a Unix shell script that does the following:
1) Searches all of the files in a given directory that have the .acl file extension
2) Redirects the output of the search to a column in a .xls or .cvs file
(Note: The column name in the spreadsheet file needs to be named... (2 Replies)
Discussion started by: ijmoore
2 Replies
10. Shell Programming and Scripting
I want to take out the Z1 value from the lscfg outpu and use the below command to get it
lscfg -vl hdisk0 | grep "Device Specific.(Z1)" | awk -F. '{print $NF}'
# lscfg -vpl hdisk0
.
.
Device Specific.(Z0)........0000063268181002
Device Specific.(Z1)........020064a
.
And it works,... (2 Replies)
Discussion started by: moorthikv
2 Replies
LEARN ABOUT OSF1
rcsfreeze
rcsfreeze(1) rcsfreeze(1)
NAME
rcsfreeze - freeze a configuration of sources checked in under RCS
SYNOPSIS
rcsfreeze [name]
DESCRIPTION
rcsfreeze assigns a symbolic revision number to a set of RCS files that form a valid configuration.
The idea is to run rcsfreeze each time a new version is checked in. A unique symbolic name (C_number, where number is increased each time
rcsfreeze is run) is then assigned to the most recent revision of each RCS file of the main trunk.
An optional name argument to rcsfreeze gives a symbolic name to the configuration. The unique identifier is still generated and is listed
in the log file but it will not appear as part of the symbolic revision name in the actual RCS files.
A log message is requested from the user for future reference.
The shell script works only on all RCS files at one time. All changed files must be checked in already. Run rcsclean(1) first and see
whether any sources remain in the current directory.
RESTRICTIONS
rcsfreeze does not check whether any sources are checked out and modified.
Although both source file names and RCS file names are accepted, they are not paired as usual with RCS commands.
Error checking is rudimentary.
rcsfreeze is just an optional example shell script, and should not be taken too seriously. See CVS for a more complete solution.
FILES
version number log messages, most recent first
IDENTIFICATION
Author: Stephan v. Bechtolsheim
SEE ALSO
co(1), rcs(1), rcsclean(1), rlog(1)
rcsfreeze(1)