Sponsored Content
Top Forums Shell Programming and Scripting Help with shell 'select' comand Post 302896399 by edstevens on Monday 7th of April 2014 11:39:45 AM
Old 04-07-2014
Help with shell 'select' comand

Oracle Linux5.6 64 bit
Need some help with use of ‘select' command.
Given the following:
Code:
PS3='Select recovery SCN: '
  select rcvscn in ` sqlplus -s rman/fubar@rmcat <<EOF1
     select db_name,
            CHECKPOINT_CHANGE# SCN,
            to_char(CHECKPOINT_TIME,'dd-Mon-yyyy hh24:mi:ss') CHECKPOINT_TIME
     from RC_BACKUP_CONTROLFILE
     where db_name=upper('${prddb}')
     order by db_name,
              CHECKPOINT_TIME
     ;
  EOF1`
  do
  break
  done

The ouput of the SQL ‘select' has three columns. So when it is fed to the shell ‘select', each separate column is presented as a separately numbered element. I'd like to be able present each row as a numbered/selectable element.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to select Shell

We are using the line #!/usr/bin/ksh in the script, to run the script in ksh. If I have Bash shell and Ksh, how to select the shell to run the script during runtime? Thanks in advace Victor (2 Replies)
Discussion started by: mvictorvijayan
2 Replies

2. UNIX for Dummies Questions & Answers

select count(*) in sqlplus into variable unix shell

Need to select count(*) from table to check for zero result in unix script (2 Replies)
Discussion started by: struggle
2 Replies

3. Shell Programming and Scripting

using SELECT sql statement in shell script

Hi there I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this SN=123456 n=server1 m=x4140 sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';" echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
Discussion started by: hcclnoodles
4 Replies

4. Shell Programming and Scripting

Select query implement in a shell

I have been asked to create a shell script that accepts a number of SQL select queries as input, runs them in sequence, spools the output to an EXCEL workbook, where, each worksheet is an output of a Select statement run above. The workbook should be in a .XLS format. If a particular select... (2 Replies)
Discussion started by: ShellNovice1
2 Replies

5. Shell Programming and Scripting

How to select/delete some lines in shell?

I need to delete half(approx) the file or select half the file by existence of some character My file looks like 1 2 3 4 . . . 50 . . 100I need to select only 50 to rest of the file or needs to delete the file upto 50. Please help me out.. (6 Replies)
Discussion started by: SujeethP
6 Replies

6. Shell Programming and Scripting

How to use select into command in shell script?

I need to get total number of rows in a table by using select count(*) from table and need to assign into a variable in shell script. I used the following script, it does return the number of rows but also with oracle headers, Please help me to eliminate this headers. Shell Script #!/bin/sh... (16 Replies)
Discussion started by: vel4ever
16 Replies

7. Shell Programming and Scripting

Select combination unique using shell script

Hi All, bash-3.00$ gzgrep -i '\ ExecuteThread:' /******/******/******/******/stdout.log.txt.gz <Jan 7, 2012 5:54:55 PM UTC> <Error> <WebLogicServer> <BEA-000337> < ExecuteThread: '414' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "696" seconds working on the request... (4 Replies)
Discussion started by: osmanux
4 Replies

8. Shell Programming and Scripting

How to print the output of a select query using shell script?

HI, I want to connect to database and fetch the count from a table. The sql query is as below : select count(*) from table_test where test_column='read'; How can I print the output of this statement using shell script. Thanks in advance. (4 Replies)
Discussion started by: confused_info
4 Replies

9. Shell Programming and Scripting

Select answers from multiple questions using shell script

I have a text file in this format Some lines.... Question no: 1 The question? A. Answer 1 B. Answer 2 C. Answer 3 D. Answer 4 Answer:B Some lines.... Question no: 2 The question? (choose 2) (10 Replies)
Discussion started by: zorrox
10 Replies

10. Shell Programming and Scripting

Modifying the shell script to select pattern

Hello, I have script which work 70% of the desired task , the output from script.sh is following , however the desired output I require is following . Any piece of suggestion would be great.. thanks in advance, emily #!/bin/bash ... (8 Replies)
Discussion started by: emily
8 Replies
GUILT-SELECT(1) 						   Guilt Manual 						   GUILT-SELECT(1)

NAME
guilt-select - Select guards to apply when pushing patches SYNOPSIS
guilt-select [ -n | --none | -s | --series | [--pop|--reapply] <guards...> ] DESCRIPTION
Select guards to apply when pushing patches. Guards are selected without the + or - prefix. Patches are applied in the following way: o An unguarded patch is always applied. o A patch with a positive guard is applied only if the guard is selected with guilt-select. o A patch with a negative guard is applied unless the guard is selected with guilt-select. OPTIONS
-n|--none Remove all selected guards --pop Pop back to the first guarded patch --reapply Pop back to first guarded patch, select a new guard, and push -s|--series List all guards listed in the series file AUTHOR
Written by Eric Lesh <eclesh@ucla.edu[1]> DOCUMENTATION
Documentation by Eric Lesh <eclesh@ucla.edu[1]> GUILT
Part of the guilt(7) suite (Generated for Guilt v0.35) NOTES
1. eclesh@ucla.edu mailto:eclesh@ucla.edu Guilt v0.35 01/20/2013 GUILT-SELECT(1)
All times are GMT -4. The time now is 05:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy