08-06-2008
Small shell script help required
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 [ -s $CONF ]; 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 $CONF.$SUFFIX
[ $CLOBBER -ne 0 ] && COPY=1
else
COPY=1
fi
Regards,
Abhishek
10 More Discussions You Might Find Interesting
1. Linux
Hi,
iam presenting the input text file format.Of this i need the character count of the number of characters present in each file.The attached file is a combination of 3 text file.each text file starts at record 1 - 34, then the next tetx file starts. What i need is the character count of each... (1 Reply)
Discussion started by: sethunath
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 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
5. Shell Programming and Scripting
There are two fields actually one is server name and the other one is Time.
Based on time, there are 8 columns and these will be updated with the flag 1 if at all if there is any server name.
Time
Server name
15 to 18
18 to 21
21 to 24
00 to 03
03 to 06
06 to 09
09 to 12
Server... (3 Replies)
Discussion started by: venkatesht
3 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I am using korn shell sun solaris 10
What i need is i have to grep one file and if there are any finding then i have set one flag. otherwise continue
Please help
Regards
Arun (9 Replies)
Discussion started by: annyarun
9 Replies
7. 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
8. UNIX for Dummies Questions & Answers
I have a scenario where i need to look for files of these kind
filename.log.0
filename.log.1
if the files are present, then no action is to be taken, if not found,
then it shud create/touch files with the same name.
so can anyone help constructing the script for me..appreciate ur help.
... (5 Replies)
Discussion started by: win4luv
5 Replies
9. Shell Programming and Scripting
Hi Guys,
Sorry to bother everyone again here, but I ran into a small problem that has been after me for some time now.
I have a file called file1.txt and has following content -
/folder1/fold/folder 10k
/folder167fold/folder 10MB
/folder2/fold/folder 10G
etc..
etc..
... (1 Reply)
Discussion started by: rockf1bull
1 Replies
10. Shell Programming and Scripting
Hi,
I am new to UNIX and have an issue.
I need to check that whether a perticular file name exists or not. I wan to do that in loop to avoid number of IF statements.
I need to check that
if file10.txt exists rename that to file11.txt.
if file9.txt exists rename that to file10.txt.
:
:
if... (5 Replies)
Discussion started by: unankix
5 Replies
LEARN ABOUT DEBIAN
email2page
EMAIL2PAGE(1p) User Contributed Perl Documentation EMAIL2PAGE(1p)
NAME
email2page - converts RFC822 email text into text suitable for paging
SYNOPSIS
email2page [-C CONF] [-h]
OPTIONS
-C CONF
Read the configuration file CONF instead of /etc/sendpage/email2page.conf for the rewriting rules.
-h Display a summary of all the available command line options (and there sure aren't many).
DESCRIPTION
This tool is used to break down an email into a shortened version, using a configurable set of rewriting rules, found in
/etc/sendpage/email2page.conf. email2page reads STDIN, and writes to STDOUT. Any errors will be reported on STDERR. It was designed to
be used with 'sendpage'.
AUTHOR
Kees Cook <kees@outflux.net>
BUGS
All the bugs with the program will probably come from the config file, as several of the items are run with Perl's 'eval' statement.
Please see the documentation in the /etc/sendpage/email2page.conf file.
COPYRIGHT
email2page is free software; it can be used under the terms of the GNU General Public License.
SEE ALSO
perl(1), sendpage(1), Mail::Internet(3)
perl v5.10.0 2009-05-19 EMAIL2PAGE(1p)