02-26-2008
Cool, Klashxx I'm going to study your script. Thanks for the reply.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
2. Shell Programming and Scripting
Hello all, I'm working on an attendance callout script for a school district. I need to change our current layout for the vendor. Currently the data is in the form of:
studentid,period,building,
Heres a sample of some made up records:
500,1,30,
500,2,30,
500,3,30,
500,6,30,... (7 Replies)
Discussion started by: axo959
7 Replies
3. Shell Programming and Scripting
Hello,
Could some expert soul please help me with this? I have following file format -
task time
abc 5
xyz 4
abc 5
xyz 3
ddd 10
ddd 2
I need to generate output as -
task ... (5 Replies)
Discussion started by: sncoupons
5 Replies
4. Shell Programming and Scripting
Hi,
I've the following two CSV files:
File1.csv File2.csv
Class,Student# Student#,Marks
1001,6001 6002,50
1001,6002 6001,60
1002,7000 ... (3 Replies)
Discussion started by: Matrix2682
3 Replies
5. Shell Programming and Scripting
Hi,
I've a file like below:
DeptFile.csv
DeptID EmpID
------- ------
Dep01 Emp01
Dep01 Emp02
Dep01 Emp03
Dep02 Emp04
Dep02 Emp05
I've another file which has
EmpFile.csv
EmpID Salary
------ ------ (3 Replies)
Discussion started by: Matrix2682
3 Replies
6. Shell Programming and Scripting
I found some posts describing how to completely clean out a mailbox in Unix/Linux. But I want to keep the 50 most recent messages. Any ideas out there?
Thanks! (3 Replies)
Discussion started by: OPTIMUS_prime
3 Replies
7. Shell Programming and Scripting
Links Please??? (2 Replies)
Discussion started by: Diddy
2 Replies
8. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script. I should replace in a very great file the character ";" with a space.
Example:
2750;~
2734;~
2778;~
2751;~
2751;~
2752;~
what the fastest method is? Sed? Awk?
Speed is dead main point, Seen the dimensions of the files
Thanks (6 Replies)
Discussion started by: GERMANICO
6 Replies
9. Shell Programming and Scripting
Hi gurus,
I have data coming in as shown below. And in each case, I need to pick the data in the last group as shown below.
Data Set 1:
DC | 18161621
LA | 15730880
NY | 16143237
DC | 18161621
LA | 17316397
NY | 17915905
DC | 18161621
LA | 17993534
NY | 18161621
DC | 18161621... (11 Replies)
Discussion started by: calredd
11 Replies
10. UNIX for Beginners Questions & Answers
Hi I want to use sed to change a text files input into an awk script.
For example if the input says " chord -- english " I want to change this using sed 's/pattern 1 /pattern 2 /'g filename but I don't understand how to use part of the pattern 1 to input that into pattern 2 . Like after... (10 Replies)
Discussion started by: enforcer
10 Replies
pwck(1M) System Administration Commands pwck(1M)
NAME
pwck, grpck - password/group file checkers
SYNOPSIS
/usr/sbin/pwck [filename]
/usr/sbin/grpck [filename]
DESCRIPTION
pwck scans the password file and notes any inconsistencies. The checks include validation of the number of fields, login name, user ID,
group ID, and whether the login directory and the program-to-use-as-shell exist. The default password file is /etc/passwd.
grpck verifies all entries in the group file. This verification includes a check of the number of fields, group name, group ID, whether any
login names belong to more than NGROUPS_MAX groups, and that all login names appear in the password file. The default group file is
/etc/group.
All messages regarding inconsistent entries are placed on the stderr stream.
FILES
/etc/group
/etc/passwd
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
getpwent(3C), group(4), passwd(4), attributes(5)
DIAGNOSTICS
Group entries in /etc/group with no login names are flagged.
Group file 'filename' is empty
The /etc/passwd or /etc/group file is an empty file.
cannot open file filename: No such file or directory
The /etc/passwd or /etc/group file does not exist.
NOTES
If no filename argument is given, grpck checks the local group file, /etc/group, and also makes sure that all login names encountered in
the checked group file are known to the system getpwent(3C) routine. This means that the login names may be supplied by a network name
service.
SunOS 5.10 20 Oct 2002 pwck(1M)