Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: grapes12
  • Content: Threads
  • Order by date
  1. grapes12

    DBMS_SPACE.UNUSED_SPACE schema usage

    Good-day I'm using the following procedure, to determine total blocks and unused blocks within a schema. Currently I am inserting one table at a time, HOW CAN I SELECT ALL TABLES WITHIN THE SCHEMA, is there a way of doing it, ANY help will be much appreciated et serveroutput on set verify...
  2. grapes12

    RDA execution

    Morning guys, I am running oracle 11g, on solaris 10. I need to run the rda.sh script everyday, via a crontab.Problem is it needs operator intervention to type in the password, how can I pass the password in the script? Any help will be much appreciated
  3. grapes12

    awk to grep and print output

    I have the following file which i need to extract only certain data from extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 3.4 5.9 399.8 144.0 0.0 0.6 0.0 64.4 0 11 sd0 0.4 3.3 5.0 33.0 0.0 0.1...
  4. grapes12

    file count in directory and sub-directories

    I have two commands with different counts on the same directory. directory /u1/oracle find . -name '*' | wc -l 69355 find . -type f -print | wc -l 64008 I am assuming the first command includes hiden files and the second does not. Am I correct in my assumption or not. How would I know...
  5. grapes12

    Email my output, for every option I choose

    I have a unix script, which displays a menu with options. Every menu has a sub_menu with its own options. The sub-menu's all run different select statements from the database. I would like to know what i need to change for each menu function to email its own output for the option chosen. here is...
  6. grapes12

    Remove files within a unix shell script

    Afternoon, Iam currently running a oracle datapump through a unix shell script. The problem i have is that the dmp files have increased over time to more or less 25 dmp files perday BUT are not deleted daily. It deletes only the first 22 files leaving the other two or three in the set...
  7. grapes12

    Script to Compare two directories

    I have the following script which is to compare two directories using the sdiff command #!/bin/ksh LOCALFOLDER=/u1/mac2 REMOTEFOLDER=$(rsh sun5 'ls -lA /u1/mac2' > remotessh.txt) COMMAND=$(ls -lA $LOCALFOLDER > localssh.txt) REM=$(cat remotessh.txt) LOCAL=$(cat localssh.txt) echo $LOCAL echo...
  8. grapes12

    How can i prevent SQL output being dsiplayed on screen

    I have a unix menu setup to turn on/off index monitering on the DB. BUT the SQL output runs on the screen. HOW can i prevent this from happening. #!/bin/ksh WORKDIR=/u1/home/oradba/ LOGS=/u1/home/oradba/logs/ LOGO=" INDEX MONITERING " MONITORING=`cat /u1/home/oradba/logs/startmonitoring.txt |...
  9. grapes12

    how to fix Errors on composite partition by list- to list

    Receiving duplicate errors when trying to create a composite partition by list - to list ORA-14615: List value '01' specified twice in subpartitions 'L20M_P3_01', 'L20M_P6_01' herewith is the create script PARTITION BY LIST (POSTING_YEAR) SUBPARTITION BY LIST (POSTING_PERIOD) SUBPARTITION...
  10. grapes12

    Email my output

    I have a script, running a sql via a function, with input parameters. my function does execute the select statement and produces the output. But the output is not being emailed. {code} #!/bin/ksh USER_001P=`cat /var/opt/oracle/USER_001P` UNUSED_INDEX=/u1/home/oradba/logs/unused_index.txt...
  11. grapes12

    Data differences

    I have the following awk command, reading data from my local server(sun5) and remote server(sun8).Each doing the same command and displaying the differences into a diffs.txt file. awk 'BEGIN {while ( getline < "sun5-printers.txt") {arr[$0]++ } } { if (!($0 in a rr ) ) { print } }'...
  12. grapes12

    two scripts must be combined into one

    how can i combine the following two scripts into one: #!/bin/ksh BIN=/usr/lbin LINE='device for 0101a01: lpd://172.25.41.111:515' while read LINE do prt=`echo $LINE | awk '{print $3 }'| cut -c 1-7` echo $prt #drv=`echo $LINE | awk -F":" '{print $2}'` #echo $drv #IP=`echo $LINE | awk -F"/"...
  13. grapes12

    : test: ] missing

    receiving this error when doing the following: for P in $printer_list; do if [ "$P" -eq 0117bd1]; then echo "\n\t Adding printers $P !!!!" is something amiss
  14. grapes12

    synthax error using do command

    i am trying the following while IFS =: read printer drv IP port do echo -e "$ printer: \ n \ drv: \ t $ drv \ n \ IP: \ t $ IP \ n \ port: \ t $ port \ n \" done < diffs.txt BUT RECEIVING following syntax error: syntax error at line 37 : `do' unmatched Something is amiss
  15. grapes12

    awk displaying duplicates

    awk command displays duplicates awk 'BEGIN {while ( getline < "sun5-printers.txt") {arr[$0]++ } } { if (!($0 in a rr ) ) { print } }' sun8-printers.txt > diffs.txt or is it my do command: for i in `cat diffs.txt` do printer="$(awk -F: '{print $1}' | cut -c11-18 diffs.txt)" echo...
  16. grapes12

    how to create printers on unix within a function

    I need assistance on creating ,deleting printers within a function herwith is what i have #!/bin/ksh BIN=/usr/lbin LOCAL_FILE=`$BIN/lpstat -v >> sun5-printers.txt REMOTE_FILE=`rsh sun8 /usr/lbin/lpstat -v >> sun8-printers.txt awk 'BEGIN {while ( getline < "sun5-printers.txt") {arr[$0]++ }}{ if...
  17. grapes12

    help with Unix function

    how can I amend this function to include deleting a printer. function printerExists() { if [ $prExists -eq 1 ]; then echo "Printer already exists. Skipping: \"$prName\"" else # Add Printer Command lpadmin -p "${prName}" -E -D "${prDescript}" -L "${prLocation}" -i...
  18. grapes12

    need to delete,create or amend printers on DEV server

    Need help with script to delete,create or amend printers on DEV server from the PROD server using the lpadmin command. Senior said i should use the rsh command in my script, to get a list of printers using lpstat -v command. where do i start?????
  19. grapes12

    help needed with sql

    CREATE TABLE APPLSYS.FND_USER ( USER_ID NUMBER(15), USER_NAME VARCHAR2(100 BYTE), LAST_UPDATE_DATE DATE, LAST_UPDATED_BY NUMBER(15), CREATION_DATE DATE, CREATED_BY...
  20. grapes12

    changes to etc/passwd file

    herewith is my script FILE1=$ORACLE_SQL FILE2=/etc/passwd cp $FILE2 /etc/passwd.$$.orig while IFS=":" read user comment do user=$(echo $user | tr -d ' ') [ -z "$(awk -F: "/^$user:/"' && $5 == "" {print $2}' $FILE2)" ] || usermod -c "$ comment" $user done <$FILE1 BUT now if a change is made...

Part and Inventory Search

Back
Top