The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Profile Issue scorphg SUN Solaris 6 09-24-2008 08:11 PM
a weird issue with "while" block sleepy_11 Shell Programming and Scripting 7 08-06-2007 11:33 PM
BAD SUPER BLOCK - Run fsck with alternate super block number admin wanabee HP-UX 1 09-08-2006 01:57 PM
Linux / tape Block size issue rcarpent Red Hat 1 05-18-2006 10:27 AM
changed .profile but didnt ./.profile, yet reflected changes yls177 UNIX for Dummies Questions & Answers 4 12-05-2002 11:21 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-09-2008
a2156z a2156z is offline
Users Awaiting Email Confirmation
  
 

Join Date: Oct 2008
Posts: 30
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.
 

Bookmarks

Tags
unresolved, unresolved for months, unresolved for weeks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0