10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am writing one shell script in which there is one Java program call.
I want to stop execution of shell script ahead of java program if the java program returns 1 .
How to read that value of java program from OS ? (3 Replies)
Discussion started by: ParthThakkar
3 Replies
2. Shell Programming and Scripting
Hi all,
a question for the Perl knowledgeable:
I have use warnings; enabled.
I use something like:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
In the further code I only work with some of the returned variables, as the others I have no need for.
Though the... (1 Reply)
Discussion started by: zaxxon
1 Replies
3. UNIX for Dummies Questions & Answers
hey i am using this code to connect to sql , store the value in variable and then
compare it with another variable after some time by executing the same query
but the desired result is not coming
#!/bin/bash
val=$(sqlplus -s rte/rted2@rel76d2 <<ENDOFSQL
set heading off
set feedback off... (11 Replies)
Discussion started by: ramsavi
11 Replies
4. Shell Programming and Scripting
Hi All,
I am connecting to Oracle DB from UNIX script. Want to capture all dates between start date and end date and store them in file. Once this is done, want to read dates one by one. How to achive this in UNIX and Oracle? Please let me know if you have any idea on the same.
Thanks and... (4 Replies)
Discussion started by: Nagaraja Akkiva
4 Replies
5. Shell Programming and Scripting
Hi Folks
I wanted to do something like this :
Go through all the top_level_dirs inside a particular dir.
Grep a particular string in the files in each of those dirs.
Count the occurence of that string in that file
Keep adding these (wc) values so that I can know the total occurences of that... (1 Reply)
Discussion started by: abcdino
1 Replies
6. Shell Programming and Scripting
Dear Friends,
I have a command which can result following output.
Packet is: /var/adm/yyyy/pkt6043
Intended for network : /vob/repo
I would like to retrive
pkt6043 and /vob/repo using single command.
Blue color test will be always contstant and red color text will be dynamic
... (2 Replies)
Discussion started by: baluchen
2 Replies
7. UNIX for Dummies Questions & Answers
Hello
I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable:
FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}`
When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies
8. Shell Programming and Scripting
For e.g I have a file named "relation" which has three coloums i.e
JOHN MARY JACK
PETE ALISIA JONNY
TONY JACKIE VICTOR
If I do
grep -w 'JOHN' relation | awk '{print""$1" is husband of "$2" & father of "$3""}'
It gives out
JOHN i husband of MARY & father of JACK (which is desired... (7 Replies)
Discussion started by: nick_25
7 Replies
9. Shell Programming and Scripting
Dear All,
I have a command which gives the number of fields of each line of a comma-separated file.
sthng like this :
cat QDB_20071126_002.bad | awk -F"," '{ print NF }'
I need to assign the first output and the last output of the above command to variables in a script.
Need help to do... (4 Replies)
Discussion started by: KrishnaSaran
4 Replies
10. Shell Programming and Scripting
I have a PERL script from which I need to make a HTTP request to Web Servlet (Essentially a URL with variables and values like &Variable1=AAAAAA&Variable2=BBBBBBBBB&Variable3=CCCCCCC). The Web servlet returns an XML result which needs to be parsed for the contents of the result within the program.... (15 Replies)
Discussion started by: jerardfjay
15 Replies
READONLY(1P) POSIX Programmer's Manual READONLY(1P)
PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
readonly - set the readonly attribute for variables
SYNOPSIS
readonly name[=word]...
readonly -p
DESCRIPTION
The variables whose names are specified shall be given the readonly attribute. The values of variables with the readonly attribute cannot
be changed by subsequent assignment, nor can those variables be unset by the unset utility. If the name of a variable is followed by =
word, then the value of that variable shall be set to word.
The readonly special built-in shall support the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
When -p is specified, readonly writes to the standard output the names and values of all read-only variables, in the following format:
"readonly %s=%s
", <name>, <value>
if name is set, and
"readonly %s
", <name>
if name is unset.
The shell shall format the output, including the proper use of quoting, so that it is suitable for reinput to the shell as commands that
achieve the same value and readonly attribute-setting results in a shell execution environment in which:
1. Variables with values at the time they were output do not have the readonly attribute set.
2. Variables that were unset at the time they were output do not have a value at the time at which the saved output is reinput to the
shell.
When no arguments are given, the results are unspecified.
OPTIONS
See the DESCRIPTION.
OPERANDS
See the DESCRIPTION.
STDIN
Not used.
INPUT FILES
None.
ENVIRONMENT VARIABLES
None.
ASYNCHRONOUS EVENTS
Default.
STDOUT
See the DESCRIPTION.
STDERR
The standard error shall be used only for diagnostic messages.
OUTPUT FILES
None.
EXTENDED DESCRIPTION
None.
EXIT STATUS
Zero.
CONSEQUENCES OF ERRORS
Default.
The following sections are informative.
APPLICATION USAGE
None.
EXAMPLES
readonly HOME PWD
RATIONALE
Some historical shells preserve the readonly attribute across separate invocations. This volume of IEEE Std 1003.1-2001 allows this behav-
ior, but does not require it.
The -p option allows portable access to the values that can be saved and then later restored using, for example, a dot script. Also see
the RATIONALE for export for a description of the no-argument and -p output cases and a related example.
Read-only functions were considered, but they were omitted as not being historical practice or particularly useful. Furthermore, functions
must not be read-only across invocations to preclude ``spoofing'' (spoofing is the term for the practice of creating a program that acts
like a well-known utility with the intent of subverting the real intent of the user) of administrative or security-relevant (or security-
conscious) shell scripts.
FUTURE DIRECTIONS
None.
SEE ALSO
Special Built-In Utilities
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE
/The Open Group 2003 READONLY(1P)