由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - Korn shell script
相关主题
which shell is the best among csh, ksh, bsh?Shell Script: about soft link
请教一个UNIX问题, 也许很低级, 谢谢关于perl和linux shell script的书最经典有哪些? (转载)
bad root shell?Shell Script
question为什么我就是不会写Shell script?
how to change the log in shell?login shell and normal shell?
a question in shell scripta UNIX permission question
Shell Script Question about HostnameApache中如何加入用户和口令?
shell programminghow to redirect error output under unix
相关话题的讨论汇总
话题: shell话题: script话题: directory话题: korn话题: perl
进入Unix版参与讨论
1 (共1页)
b**********e
发帖数: 13
1
Just wonder if anyone can give some help in writing the following Korn Shell:
Unix script to check that all users in the /etc/passwd file
have a home directory and that the directory is owned by the correct
user and group. Also check that the directory has
permissions rwxr-sr-x. Generate a report of any abnormalities
q***e
发帖数: 90
2
you need to write a "awk" script if you could only
use shell. It could also be done with PERL.
actually, the sh script and PERL script will be almost
identical. But PERL may be easier(actually it depends whether
your are more familiar with shell or PERL).

Shell:

【在 b**********e 的大作中提到】
: Just wonder if anyone can give some help in writing the following Korn Shell:
: Unix script to check that all users in the /etc/passwd file
: have a home directory and that the directory is owned by the correct
: user and group. Also check that the directory has
: permissions rwxr-sr-x. Generate a report of any abnormalities

m****m
发帖数: 165
3
Using ksh, writing a script to parse each line in /etc/passwd.
Using 'cut' or 'awk' to get the field (such as uid, gid...), compare with what
you get from running 'ls', output inconsistancy to a file.
For directory ownership, you might just compare it as a string.

【在 q***e 的大作中提到】
: you need to write a "awk" script if you could only
: use shell. It could also be done with PERL.
: actually, the sh script and PERL script will be almost
: identical. But PERL may be easier(actually it depends whether
: your are more familiar with shell or PERL).
:
: Shell:

1 (共1页)
进入Unix版参与讨论
相关主题
how to redirect error output under unixhow to change the log in shell?
Cannot change passworda question in shell script
shell question , help?Shell Script Question about Hostname
standalone sun box questionshell programming
which shell is the best among csh, ksh, bsh?Shell Script: about soft link
请教一个UNIX问题, 也许很低级, 谢谢关于perl和linux shell script的书最经典有哪些? (转载)
bad root shell?Shell Script
question为什么我就是不会写Shell script?
相关话题的讨论汇总
话题: shell话题: script话题: directory话题: korn话题: perl