04-27-2020
Quote:
...
I think the first line skips over the tnsnames.ora until it finds a pattern 'variable ='. So this will give us the left hand side in $1?
The second line searches for the SERVICE_NAME entry, where the value matches s, which is set on the command line to be 'pri'.
You store this in $1 ....but didn't we keep the left hand side there?
... I do not understand the third line at all.
I forgot that
( is special in ERE, that awk uses. You found it: needs to be escaped. An alternative would be
[(].
Each code line is a
condition { action }.
All three code lines are run for each input line.
If the condition in the 2nd code line is true it performs the action: print variable
a.
This is set in the 3rd code line to field#1, if it does not have a
( at the beginning.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
ghkjkjoj (4 Replies)
Discussion started by: chetankelvin
4 Replies
2. UNIX for Dummies Questions & Answers
Hi everyone,
when i run ;
sqlplus -s username/password@TTTEST @umt.sql
i take "ORA-12154: TNS:could not resolve service name"
i want to run "umt.sql" query and also see result.
thanx for your helping. (6 Replies)
Discussion started by: temhem
6 Replies
3. UNIX for Dummies Questions & Answers
Can we find out what is the location of tnsnames.ora file used by the hp unix. (3 Replies)
Discussion started by: Sudipshib
3 Replies
4. Solaris
Hi all,
Am intermittently getting the following errors on one of my databases.
Errors in file /oracle/HRD/saptrace/background/hrd_psp0_13943.trc:
ORA-27300: OS system dependent operation:fork failed with status: 12
ORA-27301: OS failure message: Not enough space
ORA-27302:... (1 Reply)
Discussion started by: newbie_01
1 Replies
5. Shell Programming and Scripting
All:
Can sombodoy help me out with a sed command? Assume I have the following:
PRI =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.3.7)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pri)
... (3 Replies)
Discussion started by: BeefStu
3 Replies
6. UNIX for Advanced & Expert Users
Hi - I am trying to grep all "ORA" errors in a log files.I have to grep all ORA errors except one error for example ORA-01653.How can exclude that error in "grep" command?
In following "grep" command I want to exclude "ORA-01653" error
grep -i ORA alert.log >>/tmp/ora_errors.txt
... (7 Replies)
Discussion started by: Mansoor8810
7 Replies
7. Shell Programming and Scripting
Hi,
I would like to modify, in script schell, the line right above (DESCRIPTION and check three cases :
if line contain ".world" then line=line-".world" concat "," concat line
if line dont contain ".world" then line=line concat "," concat line concat".world"
else line=line
Keep in... (10 Replies)
Discussion started by: elcaro
10 Replies
8. Shell Programming and Scripting
Hi,
I am trying to write a script or command to remove a section from tnsnames.ora file
in the following example I would like to remove tns_alias2 section
$ cat tnsnames.ora
tns_alias1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1 )(PORT = 1521))
... (3 Replies)
Discussion started by: ynixon
3 Replies
9. AIX
Where can I find
dsn and TNSNAMES.ora
on UNIX AIX
Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
10. Red Hat
Hi,
User claim that job is running slow from their end.
I DBA found in database the below errors in alert log file.
ORA-27603: Cell storage I/O error, I/O failed on disk o/192.168.10.3/RECO_DM01_CD_01_drm01 at offset 13335789568 for data length 1048576
ORA-27626: Exadata error: 2201 (IO... (2 Replies)
Discussion started by: Maddy123
2 Replies
ali(1mh) ali(1mh)
Name
ali - list mail aliases
Syntax
ali [ -alias aliasfile ] [ -help ] [ -[no]list ] [ -[no]normalize ] [ -user useraddr ] [ -nouser ] [ aliases ... ]
Description
The command searches the specified mail alias files for each of the given aliases. It creates a list of addresses for those aliases, and
displays that list on the screen.
Options
-alias aliasfile
Specifies the alias file to be consulted by You can specify more than one alias file, but each aliasfile must be preceded by
-alias. In addition to any alias files that you specify, consults the system alias file
You can set up an entry in your so that automatically consults an alias file. To do this, add the Aliasfile entry to your pro-
file. See for more information.
-help Prints a list of the valid options to this command.
-list
-nolist Prints the addresses on separate lines. If you do not specify the -list option, the addresses are separated by commas and
printed on as few lines as possible.
-normalize
-nonormalize
Instructs to try to track down the official hostname of the address. This can be suppressed by using -nonormalize. The default
is -nonormalize.
-user useraddr
-nouser Displays all the aliases that contain a specific name. Instead of listing the addresses that each given alias expands to, lists
the aliases that expand to include each given address. You must specify the complete user name that you have used in your alias
file.
The defaults for this command are:
-alias /usr/lib/mh/MailAliases
-nolist
-nonormalize
-nouser
Examples
The following example shows how the -user option can be used to list all the aliases containing the address Parker@Venus:
% ali -user Parker@Venus
Parker@Venus: Group, Reviewers, Badminton
Profile Components
Path: Location of your Mail directory.
Aliasfile: Location of your personal alias file.
Files
The user profile.
The system alias file.
The system password file.
The system group file.
See Also
mh-alias(5mh)
ali(1mh)