03-19-2009
getting values from one file to another
Hi guys/gals,
I have solaris 10 machine and using ksh shell.
I have a huge file template (a simple text file) that gets created in the result of inputs from users (values from some other scripts). for example, one of the scripts creates users, lets say we need 2 users, then it would store those two users in the properties file like this:
(user)
username=userABC
username=userXYZ
(user)
Now, I'm trying to make my script to read the input value of the first user from this file, and then use this value in my script (which is another file), and execute it .... then the same thing for the next user. So, it would be something like a loop such that until no other users are there, keep executing your script.
Can any of you shell scripting gurus out there help a newbie out ? Please help .... <img border="0">
Thanks a lot in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL.
Regards,
Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies
2. Shell Programming and Scripting
Hi
I have 2 files:-
1. List of files which consists of names of some output files.
2. A delimited file; delimted by "|"
I want to replace the value of the $23 (23rd column) in the delimited file with name in the first file. It is always position to position. Meaning first row of the first... (5 Replies)
Discussion started by: pparthiv
5 Replies
3. Shell Programming and Scripting
Hi all,
I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example.
Input files :
1_col.txt 2_col.txt
a a b
x a c
p ... (5 Replies)
Discussion started by: AshwaniSharma09
5 Replies
4. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
5. Shell Programming and Scripting
Hi
I have a file which has values in each line:
MP304,d40000
MP310,ff0000
etc
I have another file which as the first value in it and is unique in the file(not repeated). I need to replace a string with the second value above. The second file contents is as follows:(snippet)
<g
... (12 Replies)
Discussion started by: majikins
12 Replies
6. Shell Programming and Scripting
Hi,
I have 2 input files:
File 1:
echo Name > create_Name.txt
echo Group /dir/group, Name >> create_Name.txt
File 2:
Name AAA BBB CCC
group A B C
dir A1 B1 C1
................................
Need to replace the contents of File 1 with column 2, 3 & 4 values of File 2... (8 Replies)
Discussion started by: gctex
8 Replies
7. Shell Programming and Scripting
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies
8. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
9. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Discussion started by: sravanreddy
4 Replies
10. Shell Programming and Scripting
Hi,
I have two files with values in both.
File1:
cat 2 3
dog 4 5
elephant 6 7
camel 2 3
File2:
----+--gkf;ajf=
---+----
+----- cat -------=----+ 3 | 4 ----- dog ------++-- 5 | 9 ----++-- elephant |
5 | 7
---++ camel ------ ++++_---- || 8 | 9
I want the final file as:
cat 4... (1 Reply)
Discussion started by: npatwardhan
1 Replies
LEARN ABOUT SUNOS
list-file-users
asadmin-list-file-users(1AS) User Commands asadmin-list-file-users(1AS)
NAME
asadmin-list-file-users, list-file-users - lists the file users
SYNOPSIS
list-file-users --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] [--authrealmname auth_realm_name]
DESCRIPTION
Lists all the file users. 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.
--authrealmname name, in the domain.xml file, where you have different stores for file auth realm.
EXAMPLES
Example 1: Using the list-file-users command
asadmin> list-file-users --user admin1 --password adminadmin1
--host pigeon --port 5001 --authrealmname auth-realm1
Command list-file-user executed successfully
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-delete-file-user(1AS), asadmin-update-file-user(1AS), asadmin-create-file-user(1AS), asadmin-list-file-groups(1AS)
J2EE 1.4 SDK March 2004 asadmin-list-file-users(1AS)