.
.
.
when i executed the shell script it's executed successfully but when i am trying to print the environment variable it's returning empty value echo $NAME -- is giving empty value.
$NAME being empty is a strong indicator that $user_name is empty and the "command substitution" fails / results in an empty string. I guess its because the file called $abc doesn't exist. and the cat cats nothing.
Quote:
Can you please let me know what i need to change to set the environment variable ?
It would help if people knew the entire scenario. Variables in which environment do you want to set? Your current session? Future sessions? Why the echoing into the varying .profiles?
First: me == noob. Whats a good resource for shell script info cause I'm having trouble finding good info.
I'm writing a shell script to automate the setup of a flash 'page flip'.
My current code is below.
the page flip takes an xml file of format
<content>
<pages... (1 Reply)
Hi all!
I know that environment variables can be set on the .bashrc file, but I need to set them from a sh script. I saw a lot of websites that teach this but it doesn't work for me.
#!/bin/sh
DEKTOP=$DESKTOP=:/home/rrodrigues/Desktop
export DESKTOP
if I do echo $DESKTOP returns me... (10 Replies)
oopps! I Meant "Define Variables within a UNIX Script"
What would be the best way to define a variable in a unix shell script so anyone who views this script doesn't know what value is assigned to that variable.
some other location...
a="/usr/lib/fileA"
Unix script...
sed... (5 Replies)
Hello Everyone
I need to create a script file which must append some lines to a target text file, I'm using sed for windows, the script file look like this:
{
a\
STRINGTABLE DISCARDABLE\
BEGIN\
5, 150 {a\
#define RC_SHELL, "%ID_SHELL%"\
#define RC_NAME, "%ID_NAME%"\
END
}
... (1 Reply)
Hi All,
I am using ETL tool Datastage and is installed on Linux environment. Few environment variables are set in datastage. Now my requirement is to use those environment variables in a unix script.
Is there any option I can do it?
Sugeestions from people working on datastage and linux... (1 Reply)
I'm pretty new to scripting in Korn shell so please forgive me...
What I'm trying to do is to create a script that calls multiple other ksh scripts and defines variables for text files.
I need it to define my user defined variables (file paths, date & time stamps, etc that are currently in... (1 Reply)
I have tried with the following:
csh -c 'source ~/.cshrc; exec bash' # works perfectly
(cat ~/.cshrc; echo exec bash) | csh # not working
And, using sed, I successfully retrieved the environment variables from ~/.cshrc
sed -rn 's/setenv\s+(\S+)\s+(.*)$/export \1=\2/p' ~/.cshrc
but now... (6 Replies)
how to store the count of queries in variables inside a filein shell script
my output :
filename
-------
variable1=result from 1st query
variable2=result from 2nd query
.
.
.
. (3 Replies)
Dear Shell script Experts,
I am working on shell script which is defined here, qsub_seq.csh . The purpose of this script is to read few input files (with defined starting index and last index) and make processing faster over server.
For some task, I had 1064 of input files, so I wrote another... (8 Replies)
Discussion started by: emily
8 Replies
LEARN ABOUT SUNOS
asadmin-update-file-user
asadmin-update-file-user(1AS) User Commands asadmin-update-file-user(1AS)NAME
asadmin-update-file-user, update-file-user - updates a current file user as specified
SYNOPSIS
update-file-user --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] [--userpassword user_password] [--groups user_groups:[user_groups]*] [--authrealmname
auth_realm_name] user_name
DESCRIPTION
Updates an existing entry in keyfile by the specified user_name, user_password and groups. Multiple groups can be entered by separating
them, with a colon, ":". If the auth_realm_name is not specified, an entry is created in the default keyfile. If auth_realm_name is speci-
fied, an entry is created in the keyfile where the auth-realm name in the domain.xml file points to.
This command is supported in remote mode only.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
--interactive if set to true (default), only the required password options are prompted.
--userpassword password for the file user.
--groups group where the file user belongs to.
--authrealmname name, in the domain.xml file, where you have different stores for file auth realm.
OPERANDS
user_name name of file user.
EXAMPLES
Example 1: Using the update-file-user command
asadmin> update-file-user --user admin1 --password adminadmin1
--host pigeon --port 5001 --userpassword sample_password
--groups staff:manager:engineer --authrealmname auth-realm1 sample_user
Command update-file-user executed successfully
Where: the sample_user is the file user updated with the updated user password and groups.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-delete-file-user(1AS), asadmin-list-file-users(1AS), asadmin-create-file-user(1AS), asadmin-list-file-groups(1AS)J2EE 1.4 SDK March 2004 asadmin-update-file-user(1AS)