If your column is the last in the file and if you have "rev command" installed
reverse twice
rev /path/to/file | awk -F"," '{print $1}' |rev
and then remove " and ' using sed tr or your favorite tool
How did you put this line in crontab ?
1 10 ** 0,2-6 ksh -c "/sitemgr/backup/bkupproc/appbkup.ksh rmt1"
By using crontab -e ( which edit and restart cron daemon )
or by editing the underlied file using your favorite editor in which case, you are still using old crontab.
At first glance, it looks OK.
Repalace Displaymenu with displaymenu in the definition of the function
Replace echo `DATE` with date
and call your functions in the while loop
while true
do
displaymenu
read answer
case $answer in
1) do_takeon ;;
2) do_expired ...
Hi, think eval if you want some pointer behaviour that works in two times
Counter=0
while [ $Counter -le 3 ];
do
eval X=Input$Counter
echo $X
eval $X=$(cat /tmp/lst$Counter | awk '{print $1}')
eval Y=\$Input$Counter
echo $Y
Counter=`expr $Counter...
Hi,
This grep will discard all DROP lines with a 4 chars tablespace name
grep -v "DROP TABLESPACE.......INCLUDING CONTENTS CASCADE CONSTRAINTS" drop.sql > drop.sql_modified
7 dots stands for 2 spaces and 4 chars tablespace name and a space.
SYSAUX and SYSTEM will be discarded
Hi,
I am running an Oracle 9.2.0 on AIX box. The installation was made from a tape and I dont have the original set of CDs to run OUI.
Is there an SQL command that lists the set of installed patchs
In advance, Thanks
Hi,
You can use standard shell arguments as the inner loop
# set argument list the second collection
set a b c d e
for i in one two three four five
do
echo $i $1
shift #shift argument list to left
done
Hi,
You can also use functions inside the same script.
cat script1
#! /bin/ksh
function script2 {
export abc="y"
} # end of function script2
# begin of script1
# call function script2
script2
print "abc="$abc
Hi,
Files on unix are text files( scripts) or binary(compiled) files
What you call csv is some text file where fields are separated by a comma. You can't change this file to a binary ( say C compiled file ).
If you receive a file in a non portable spreadsheet format file ( say xls), you can't...
Hi,
-ge -ne -eq etc are for numeric comparaison.
If you want to compare strings, you can use the C like construction.
-ge is equivalent to ( not less )
! is the operator not
< is less
use [[ boolean expression ]] instead of [ boolean expression ]
if [[ ! "${c} ${d}" < "${StartTimeStamp}"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.