08-05-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I use the command
ls a\b\c\*.txt
from the command line on HP UNIX and it works fine - It lists all files matching *.txt in the a\b\c directory
When embeded in a ksh script
`ls a\b\c\*.txt`
it does not work - I get *.txt not found (even though there are files)
I tried... (10 Replies)
Discussion started by: GNMIKE
10 Replies
2. AIX
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution is not... (2 Replies)
Discussion started by: arsheshadri
2 Replies
3. Solaris
Hi,
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution... (3 Replies)
Discussion started by: arsheshadri
3 Replies
4. Shell Programming and Scripting
The following script is designed to backup the oracle control file to the trace directory and then copy (the trace file that was created by the backup command) and rename that file(to a .sql) to a backup disk. When I run the script from sqlplus as sysdba everything works but when I execute from... (1 Reply)
Discussion started by: tparker123
1 Replies
5. Shell Programming and Scripting
We have created a unix shell script to read a datafiles from specific input directory in Unix.
Users will be copying datafiles to the same input unix directoty.
During Testing we observed Unix Shell Script also read the incomplete datafiles which is still copying by the users.
As per requirement... (1 Reply)
Discussion started by: Kumari Reshma
1 Replies
6. Shell Programming and Scripting
#! /bin/ksh
rm -f ./xyz file --- this line is working
// Below any if stmt is not working.
if
then
echo " blah blah "
fi
or I replaced above if with
if
then
echo "dir exists"
fi
This is also not working.
I am new to KSH. So can someone help why if stmt is not... (31 Replies)
Discussion started by: saggy9583
31 Replies
7. Shell Programming and Scripting
I am having problems with the at command on Solaris 10.
There is a HP-UX 11i script that executes another script using at, but on Solaris 10 it doesn't work.
HP-UX:
# cat /tmp/at.file
date
# at -f /tmp/at.file now
warning: commands will be executed using /usr/bin/sh
job 1309845410.a at... (2 Replies)
Discussion started by: ejdv
2 Replies
8. Shell Programming and Scripting
Here's the script:
#!/usr/bin/ksh
Date=`date +%m%d%y`
CDate=`date`
FileName=cintas_hosts_and_users.$Date
echo $CDate >> $FileName
#echo $FileName
for host in `cat /collect/itthomp/cintas_hostnames.dat`
do
echo $host >> $FileName
ssh $host "awk -v Fname=$FileName -F: '{if($1 != "root"... (3 Replies)
Discussion started by: jgt157
3 Replies
9. Shell Programming and Scripting
Hi,
I tried the following but giving me all the files in the directory ,
Where i need the files which are assigned to variable like below
#!/bin/ksh
Src_Dir="/home/etc"
file_nm ="ab.temp"
for File in `ls $Src_Dir/$file_nm*`
do
File=`basename $File`
echo $File
... (2 Replies)
Discussion started by: smile689
2 Replies
10. Shell Programming and Scripting
Hi
I am not able to execute a script with ksh. Its not giving any error too.
I have tried with absolute path /usr/bin/ksh test.sh .
Also checked path variable and all looks fine
It runs fine with sh.
OS is solaris 10. (9 Replies)
Discussion started by: ningy
9 Replies
LEARN ABOUT DEBIAN
makeactive
MAKEACTIVE(8) System Manager's Manual MAKEACTIVE(8)
NAME
makeactive - tool to recover Usenet active file.
SYNOPSIS
makeactive [ -m ] [ -o ]
DESCRIPTION
Makeactive invokes find(1) to get a list of all directories in the news spool tree, /var/spool/news. It discards directories named
lost+found as well as those that have a period in them. It scans all other directories for all-numeric filenames and determines the high-
est and lowest number. The program's output is a set of active(5) file lines. Because there is no way to know if a group is moderated or
disabled, the fourth field of all entries will be y. Also, mid-level directories that aren't newsgroups will also created as newsgroups
with no entries (for example, there is a ``comp.sources.unix'' group, but no ``comp.sources'').
OPTIONS
-m If the ``-m'' flag is given, then makeactive will attempt to adjust the highest and lowest article numbers wherever possible. If
articles are found in a newsgroup, the numbers will reflect what what was found. If no articles are found in a newsgroup, the high
number from the old file will be kept, and the low number will be set to one more then the high number. This flag may only be used
if the ``-o'' flag is used.
-o If the ``-o'' flag is used, makeactive will read an existing active file for the list of group names and just renumber all groups.
It will preserve the fourth field of the active file if one is present. This is analogous to the ctlinnd(8) ``renumber'' command,
except that innd(8) should throttled or not running. Do not use this flag with output redirected to the standard active file!
EXIT STATUS
Makeactive exits with non-zero status if any problems occurred.
EXAMPLES
A typical way to use the program is with the following /bin/sh commands:
ctlinnd throttle "Rebuilding active file"
TEMP=${TMPDIR-/var/spool/news/in.coming/tmp}/act$$
if [ -f /var/lib/news/active ] ; then
if makeactive -o >${TEMP} ; then
mv ${TEMP} /var/lib/news/active
fi
else
if makeactive >${TEMP} ; then
# Edit to restore moderated
# and aliased groups.
...
mv ${TEMP} /var/lib/news/active
fi
fi
ctlinnd reload active "New active file"
ctlinnd go ''
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.3, dated 1996/10/29.
SEE ALSO
active(5), ctlinnd(8), dbz(3), filechan(8), history(5), innd(8), newsfeeds(5), makehistory(8), newsrequeue(8).
MAKEACTIVE(8)