need to add user from command prompt not to open actual file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need to add user from command prompt not to open actual file
# 1  
Old 07-28-2011
need to add user from command prompt not to open actual file

Here is my script which gives the below output when I run.First it will display the list of all groups and then ask for enter the group name and after it will ask for contribuotors or users then I will add contribuotirs or users and it will show the list of all users associated with that group but here I want to add one more thing that I want to add user from the command and not to open the actual file in the below format

WSI-contributors = c003714,e032074,c055216,c002215,jason.kramer,c054253,c186183,c149953,e027514,c055216,e032670,e032670 ,esbuser,svnsystemuser,e030809(for.e.g)

output of the script

1)PORTAL-UDP
2)RO
3)SOA
4)SPLASH
5)SSB-SysSrvc
6)TOI
7)UDP-temp
8)WSI
Enter the group name from above list to check associated user's : WSI
Enter the user's access(RW=contributors or RO=users or blank for both) :
WSI-contributors = c003714,e032074,c055216,c002215,jason.kramer,c054253,c186183,c149953,e027514,c055216,e032670,e032670 ,esbuser,svnsystemuser
# 2  
Old 08-01-2011
You cannot change files without opening them. What is you overall objective?
# 3  
Old 08-02-2011
I acheived this target without opening it.My purpose was to give the access to users who wanted an access on svn repository.I achieve it with
the help of sed command and I was able to scuuessfully add the users to the file.

Thanks in advance Smilie
Rohit
# 4  
Old 08-03-2011
Great! It looked like a good sed or awk problem, but ksh or PERL would do, too.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use Unix shell script to open Windows command prompt (cmd)

Hello, I work on Windows and I use Putty to access a remote UNIX server. I am trying to build a shell script that will have as main task to open the Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies

2. Shell Programming and Scripting

display the actual number of bash command interpreter

Hello everybody! I have a problem "Write script, which will display the actual number of bash command interpreter, working in the operating system." I used ps command to list all process running in the system but I don't know how to select only bash command interpreter. Pls give me some... (3 Replies)
Discussion started by: nguyendu0102
3 Replies

3. UNIX for Dummies Questions & Answers

Trimming a file from command prompt!

I have a text file. I want the top 100 lines of this file to be deleted that too from command line using minimum command input. Please tell! (1 Reply)
Discussion started by: nixhead
1 Replies

4. Shell Programming and Scripting

Open the file and replace the variable with actual value

Hi, i have a sql file named sample.sql. The query is given below. select count(*) from $TABLE_NAME In the main script, i am sourcing this sql. I need to replace the $TABLE_NAME with actual value, before running the query. How can i achieve that? The logic i tried is given below:... (3 Replies)
Discussion started by: bharathappriyan
3 Replies

5. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

6. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

7. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

8. AIX

run which command to check the actual user

hi gurus, i have a question: when run which javac under a user account I got the following results: PROD DB Server: /usr/java14/bin/javac DR DB Server: /usr/java14/bin/javac DEV DB Server: /usr/java5_64/bin/javac The .profile in all environments are same. so how do know who is the... (1 Reply)
Discussion started by: lweegp
1 Replies

9. Shell Programming and Scripting

Processes by User's actual names

Hi All I am being trained in unix and am tryin to write a script for listing the user Processes by user's names exactly the following manner WITHOUT USING A TEMPORARY FILE or SED OR AWK! The format of the output I want is: James Hallan PID TTY TIME CMD 31799 pts/3 00:00:00 vim 31866... (1 Reply)
Discussion started by: kartikkumar84@g
1 Replies

10. UNIX for Advanced & Expert Users

user prompt doesn't pop up with rsh command

Hello All, I'm trying to run some script on other host by using rsh command. This script asking for user id which follows by password requisition. The problem which I faced is that the user requisition prompt never appear. It look like the script is running and wait for the user id to be... (1 Reply)
Discussion started by: ronenalalush
1 Replies
Login or Register to Ask a Question