Issue about how to add a block into profile?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Issue about how to add a block into profile?
# 1  
Old 12-09-2008
Issue about how to add a block into profile?

I have to write a rbac script to add something into a role's profile, this script will be executed for many times, during this script, it will add a block into the profile.
if the profile exists, it should check the block has been there, if, just replace it with the latest settings, take an example here:
if [ -r /it/etc/envinit ]; then
. /it/etc/envinit
fi
The block upon should be added into the profile, customer may modify this profile, it must be a strict check that there is no duplicate lines like that settings. How should I do to check that ?

what if there is a blank line or comment line added by customer among that block? what if some spaces added into the lines different as the original?
Can anyone give me some sugguestion?
Thanks a lot.
a2156z
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Add a new user to a vt100 profile

Hello Team, I am trying to add a user a9acd012 and the user has to be added to two groups in unix and two groups in windows, Also i want to give the user vt100 profile when i create the user.Can anyone here help me with the command please.Thanks in advance. (1 Reply)
Discussion started by: Revathi2089
1 Replies

2. UNIX for Advanced & Expert Users

Issue Regarding environment/.profile file

Hi All, I have my own .profile file and environment file. To execute some commands I always need to load some module using module command and change my environment files to project environment file (. /some/project/some/path/init.environ).Without changing my environment file to project file,... (2 Replies)
Discussion started by: saps19
2 Replies

3. Shell Programming and Scripting

.profile issue with UNIX

Hi, There is a user in Solaris-10 zone, ora_big01. Its .profile is not getting executed due to some reason and I am not able to find that. root@trddpd-dwsq04:/# cat /etc/passwd | grep -i ora_big01 ora_big01:x:242349:220:Siebel for QA:/ccq/apps/siebel:/usr/bin/ksh root@trddpd-dwsq04:/# which ksh... (3 Replies)
Discussion started by: solaris_1977
3 Replies

4. AIX

Script to add .profile from one server to all other servers in the network

Hi experts, I am an AIX/Unix admin in my company. I have been asked by one user to distribute .profile from one server to all other servers in the network. This is what she has asked me: "Is there a way for me to save and use one .profile that I have personalized with aliases for all my... (4 Replies)
Discussion started by: uzair_rock
4 Replies

5. Solaris

[solved] Jumpstart Profile Issue

I have created profile file for zfs root (flash) on a wanboot server when i try to validate the rules file with check i get following error .. i 'm not sure why i 'm getting this error .. can any one help me on this ? # ./check Validating rules... Validating profile profile... Error in... (0 Replies)
Discussion started by: fugitive
0 Replies

6. UNIX for Dummies Questions & Answers

Profile execution issue

Hi I have a profile execution issue, I log on to a linux machine , then i do sudo to another user as sudo su - <username> , then <username> .profile executes properly but when I type something I loose all environment varaible and my prompt changes to '$' loosing the PS1 value that I have... (1 Reply)
Discussion started by: malavm
1 Replies

7. Solaris

Profile Issue

when I log into my solaris box, my environment variables are not getting set, and i am getting this error? any ideas? -sh: ORACLE_BASE=/u01/oracle: is not an identifier part of .profile is: export ORACLE_BASE=/u01/oracle export ORACLE_HOME=$ORACLE_BASE/app/products/10.2.0/db_1 ... (6 Replies)
Discussion started by: scorphg
6 Replies

8. Solaris

trying to add .profile for root

I am trying to add a .profile for root I cd to / do vi .profile and get /var/tmp/ExGXaaqa Read only file system... What does this mean? (4 Replies)
Discussion started by: liven
4 Replies
Login or Register to Ask a Question
COLORMGR(1)															       COLORMGR(1)

NAME
colormgr - Color Manager Testing Tool SYNOPSIS
colormgr [ --verbose ] DESCRIPTION
This manual page documents briefly the colormgr command. colormgr allows an administrator to view and change color profile to device mappings. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --help Show summary of options. COMMANDS
This program takes commands with a variable number of arguments. create-device Creates a color managed device create-profile Create a color profile delete-device Deletes a color managed device delete-profile Deletes a color profile device-add-profile Add a profile to a device that already exists device-get-default-profile Gets the default color profile for a device device-get-profile-for-qualifier Returns all the profiles that match a given qualifier device-make-profile-default Makes a profile default for a specific device device-set-kind Sets the device kind device-set-model Sets the device model device-set-serial Sets the device serial device-set-vendor Sets the device vendor find-device Find a device from the device ID find-device-by-property Find a device with a given property value find-profile Find a profile from the profile ID find-profile-by-filename Find a profile from the filename get-devices Gets all the color managed devices get-devices-by-kind Gets all the color managed devices of a specific kind get-profiles Gets all the available color profiles profile-set-filename Sets the profile filename profile-set-qualifier Sets the profile qualifier AUTHOR
This manual page was written by Richard Hughes <richard@hughsie.com>. 20 December,2008 COLORMGR(1)