my queries


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting my queries
# 1  
Old 03-27-2008
my queries

hi guys

Well, i need to have a report generation script or any script which will show me all the content/information of a file when i run that script.
Please help me on this isssue at the earliest.As i am little bit aware of scripting.Thanks in advance!

regards
ash
# 2  
Old 03-27-2008
Your requirements are so vague as to be vacuous. But try this.

Code:
echo Report Title
echo ============
cat <<HERE

Body of report goes here.
You need to fill this in with the actual report you want.
Maybe you could "cat file" instead if you want the contents of that file here.
HERE

# 3  
Old 03-27-2008
Code:
#!/usr/bin/perl

    my $file = $_[0];
  
    open (FILEPTR, $file) or die "an error occured while reading file !";
    while ( <FILEPTR> ) {
     print "$_";
     }

close ( FILEPTR );

# 4  
Old 03-27-2008
Quote:
Originally Posted by whizkidash
hi guys

Well, i need to have a report generation script or any script which will show me all the content/information of a file when i run that script.
Please help me on this isssue at the earliest.As i am little bit aware of scripting.Thanks in advance!

regards
ash
hi,(era/wolwy)
i didnt meant to cat the file and show its contents.
But i expect a syncornized method to query that file to see whether that policy has been implemented or not

for eg: /etc/passwd
The script should show me the
Default minimum password age
Default maximum password age
Default minimum password length
Default account lockout Threshold
Default Interactive logon

I guess the point is more clear now
Appriciate if it is a bash shell scripting.As am new to pearl
Thnks in advance.Waiting for ur reply
regards
ash
# 5  
Old 03-27-2008
The passwd file does not contain this information. But read up on password handling; man passwd and all that, with special attention to the SEE ALSO section.

Once you find the right manual page (this will depend on what system you're on -- for Ubuntu this would be adduser.conf(5) I guess) you will probably not even need any script.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. IP Networking

RDNS Queries

Hey everyone, I have a question, I've been playing around with tcpdump, and noticed my machine making numerous rdns look ups. They are displayed like: 10.80.80.141.51234 > 10.80.80.1.domain: 9950+ PTR? 223.114.55.65.in-addr.arpa. (44) My question is, if dns works based on numerical... (0 Replies)
Discussion started by: Lost in Cyberia
0 Replies

2. Red Hat

NFS Queries

Hi, I would like to know on one server how many mouting can be done? wheather there is limitation on number of mounting? wheather it is possible to increase NFS Performance? if yes then which parameters needs to given while mounting? (3 Replies)
Discussion started by: manoj.solaris
3 Replies

3. UNIX for Dummies Questions & Answers

FTP Queries

Hi, 1) How to get exact permissions, group names for files while transferring with FTP 2) Is there any command to transfer entire directory and sub directories. Thanks (1 Reply)
Discussion started by: nag_sathi
1 Replies

4. Shell Programming and Scripting

Crontab queries

Hi Expert, How to schedule a job on last day of the month. Need your kind help. Regards, PK (3 Replies)
Discussion started by: pkrabi78
3 Replies

5. UNIX for Advanced & Expert Users

How many DNS queries

Is there any way to see how many queries come into our external DNS server? In looking at DNS providers, most of them base pricing on number of queries per month so I just wanted to see if you had any idea/way of gathering that data? A rough ballpark figure would even work. Our DNS server is... (1 Reply)
Discussion started by: raggmopp
1 Replies

6. Programming

Combine 3 queries

can these 3 be combined into 1 query? createtablea1as selecta.tps_Res_nb, b.tkt_prod_cd, b.tkt_prod_typ_nm, b.prod_intrnl_ds, b.tkt_prod_typ_nm AS TKT_ENTL_NM, casewhen b.tkt_prod_nm isnotnullthen b.tkt_prod_nm when b.tkt_prod_nm isnulland b.prod_intrnl_ds isnotnullthen... (1 Reply)
Discussion started by: dwr80
1 Replies

7. Homework & Coursework Questions

Queries

Any help on like where to get started on this? I'm just confused. 1. The problem statement, all variables and given/known data: Enter text here.Queries to satisfy these two report requests (use your CCI database): Retrieve all rows of active inventory where current on hands is less than... (0 Replies)
Discussion started by: lakers34kb
0 Replies

8. Shell Programming and Scripting

queries about exit

hi all, please tell me clearly the difference between exit 1 and exit 2 one more question i want to know the difference between some basic shells like bsh, csh, ksh, bash. i refered in net i get wast of text pages can any one give me any link to show the diff precisely or any blogs.... (2 Replies)
Discussion started by: Arunprasad
2 Replies

9. UNIX for Advanced & Expert Users

Some queries...

Guys need some advice on how to check some of the questions below? i'm running on an open VMS platform... which i am an idiot to... appreciate if anyone can give some hints or source on how to check on.. a script that is running on cron job... but doesn't run as the login user name.. 1. why... (6 Replies)
Discussion started by: 12yearold
6 Replies
Login or Register to Ask a Question