02-24-2009
Sorry dear,
given code is not working.
I tried,below is the snapshot of Output is some like ???.
./working_script.sh: line 10: BEGIN{print "domainName,id,serviceName,hlrServ,accessRestrictionData,serviceName,bsgNum,boc,serviceName,hlrServ, msNumChanged,lockFlag"}
FNR==1{next}
FILENAME=="$f1"{a[$2]=$0}
FILENAME=="$f2" && a[$2] {for(i=2;i<=NF;i++){a[$2]=a[$2] FS $i};next}
FILENAME=="$f2" && !(a[$2]){a[$2]=$0}
FILENAME=="$f3" && a[$2] {for(i=2;i<=NF;i++){a[$2]=a[$2] FS $i};next}
FILENAME=="$f3" && !(a[$2]){a[$2]=$0}
END{for(i in a)print a[i]|"sort"}
: command not found
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
:confused: I need to find a place or places on the Internet where I can find UNIX scripts to view and to modify to make life easy on the UNIX environment. Can someone help me on this. Thanks (7 Replies)
Discussion started by: wolf
7 Replies
2. UNIX for Dummies Questions & Answers
Can anybody tell me the best way to learn unix scripting.can you recommend a good book.Please help! (1 Reply)
Discussion started by: hella
1 Replies
3. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am new to Unix Scripting. I have below scenario. I need to write a Unix function with the following.
1. I have table. From this table I need to write a query.
SELECT Col1(File_nm),Col2(From_Loc),Col3(To_Loc)
FROM A
WHERE CONDITION
For... (1 Reply)
Discussion started by: sree11
1 Replies
5. UNIX for Dummies Questions & Answers
Hi Gurus,
I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (1 Reply)
Discussion started by: madanmeer
1 Replies
6. Shell Programming and Scripting
Hi Gurus,
I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (4 Replies)
Discussion started by: madanmeer
4 Replies
7. Shell Programming and Scripting
how to check if a unix script gets executed without errors across all unix platforms.
incase if a script gets executed without errors only one platform say AIX, what needs to be done to that script such that it will run all unix platforms like linux, hp, sun etc (2 Replies)
Discussion started by: rmann
2 Replies
8. UNIX for Advanced & Expert Users
i need help with this problem this is the problem: Write a script that logs how many users login on/off the system over a 5 minute period. It can run in the foreground, and run 4 times a minute. Set a trap that will not allow a CNTRL-C command, and if a CNTRL-C is excuted store the time and date... (1 Reply)
Discussion started by: sportsmansixty6
1 Replies
9. UNIX for Dummies Questions & Answers
Hello Experts,
I have the following questions to be discussed here at this esteemed discussion forum.
I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies
10. Shell Programming and Scripting
LIST=/home/xxxxxxx/ABC/xeeno_scrpts/temp/tempfile
ERRORDIR=/home/xxxxxxx/ABC/error_directory
EMAILFILE=/home/xxxxxxx/ABC/xeeno_scrpts/temp/emailfile
echo "There were errors in the following report file for Xeenos:" > $EMAILFILE
echo >> $EMAILFILE
echo "This files have been moved to... (9 Replies)
Discussion started by: bcarosi
9 Replies
LEARN ABOUT OPENSOLARIS
comm
comm(1) User Commands comm(1)
NAME
comm - select or reject lines common to two files
SYNOPSIS
comm [-123] file1 file2
DESCRIPTION
The comm utility reads file1 and file2, which must be ordered in the current collating sequence, and produces three text columns as output:
lines only in file1; lines only in file2; and lines in both files.
If the input files were ordered according to the collating sequence of the current locale, the lines written will be in the collating
sequence of the original lines. If not, the results are unspecified.
OPTIONS
The following options are supported:
-1 Suppresses the output column of lines unique to file1.
-2 Suppresses the output column of lines unique to file2.
-3 Suppresses the output column of lines duplicated in file1 and file2.
OPERANDS
The following operands are supported:
file1 A path name of the first file to be compared. If file1 is -, the standard input is used.
file2 A path name of the second file to be compared. If file2 is -, the standard input is used.
USAGE
See largefile(5) for the description of the behavior of comm when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
EXAMPLES
Example 1 Printing a list of utilities specified by files
If file1, file2, and file3 each contain a sorted list of utilities, the command
example% comm -23 file1 file2 | comm -23 - file3
prints a list of utilities in file1 not specified by either of the other files. The entry:
example% comm -12 file1 file2 | comm -12 - file3
prints a list of utilities specified by all three files. And the entry:
example% comm -12 file2 file3 | comm -23 -file1
prints a list of utilities specified by both file2 and file3, but not specified in file1.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of comm: LANG, LC_ALL, LC_COLLATE,
LC_CTYPE, LC_MESSAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 All input files were successfully output as specified.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
cmp(1), diff(1), sort(1), uniq(1), attributes(5), environ(5), largefile(5), standards(5)
SunOS 5.11 3 Mar 2004 comm(1)