BurningChrome
MIS
Tek-Tips rocks! I am new to this resource and have read many posts and I am very impressed of the support and knowledge of the members here. Maybe someone could give me a little guidance here. I am looking for a way to print the most current version of an error log based on a database name that a script will prompt me with using the c shell. The output of the directory looks like this:
Jul 24 22:30 master.07-24-02-223040
Jul 25 22:30 master.07-25-02-223039
Jul 26 22:30 master.07-26-02-223040
Jul 27 22:30 master.07-27-02-223042
Jul 28 22:30 master.07-28-02-223040
Jul 29 22:30 master.07-29-02-223041
Jul 30 22:30 master.07-30-02-223042
Jul 31 22:30 master.07-31-02-223041
Jul 24 22:31 ntcss_org.07-24-02-223110
Jul 25 22:31 ntcss_org.07-25-02-223109
Jul 26 22:31 ntcss_org.07-26-02-223110
Jul 27 22:31 ntcss_org.07-27-02-223111
Jul 28 22:31 ntcss_org.07-28-02-223110
Jul 29 22:31 ntcss_org.07-29-02-223111
Jul 30 22:31 ntcss_org.07-30-02-223112
Jul 31 22:31 ntcss_org.07-31-02-223111
Jul 24 22:52 supply.07-24-02-225227
Jul 25 22:52 supply.07-25-02-225222
Jul 26 22:52 supply.07-26-02-225235
Jul 27 22:53 supply.07-27-02-225303
Jul 28 22:52 supply.07-28-02-225237
Jul 29 22:53 supply.07-29-02-225313
Jul 30 22:53 supply.07-30-02-225309
Jul 31 22:52 supply.07-31-02-225253
Jul 24 22:52 sybsystemprocs.07-24-02-225253
Jul 25 22:52 sybsystemprocs.07-25-02-225247
Jul 26 22:53 sybsystemprocs.07-26-02-225300
Jul 27 22:53 sybsystemprocs.07-27-02-225329
Jul 28 22:53 sybsystemprocs.07-28-02-225302
Jul 29 22:53 sybsystemprocs.07-29-02-225338
Jul 30 22:53 sybsystemprocs.07-30-02-225335
Jul 31 22:53 sybsystemprocs.07-31-02-225318
How can a script do the following:
1. Show the list of databases to choose from (master,ntcss_org,supply or sybsystemprocs)
2. Given the choice automatically print out the most recent database error log
Jul 24 22:30 master.07-24-02-223040
Jul 25 22:30 master.07-25-02-223039
Jul 26 22:30 master.07-26-02-223040
Jul 27 22:30 master.07-27-02-223042
Jul 28 22:30 master.07-28-02-223040
Jul 29 22:30 master.07-29-02-223041
Jul 30 22:30 master.07-30-02-223042
Jul 31 22:30 master.07-31-02-223041
Jul 24 22:31 ntcss_org.07-24-02-223110
Jul 25 22:31 ntcss_org.07-25-02-223109
Jul 26 22:31 ntcss_org.07-26-02-223110
Jul 27 22:31 ntcss_org.07-27-02-223111
Jul 28 22:31 ntcss_org.07-28-02-223110
Jul 29 22:31 ntcss_org.07-29-02-223111
Jul 30 22:31 ntcss_org.07-30-02-223112
Jul 31 22:31 ntcss_org.07-31-02-223111
Jul 24 22:52 supply.07-24-02-225227
Jul 25 22:52 supply.07-25-02-225222
Jul 26 22:52 supply.07-26-02-225235
Jul 27 22:53 supply.07-27-02-225303
Jul 28 22:52 supply.07-28-02-225237
Jul 29 22:53 supply.07-29-02-225313
Jul 30 22:53 supply.07-30-02-225309
Jul 31 22:52 supply.07-31-02-225253
Jul 24 22:52 sybsystemprocs.07-24-02-225253
Jul 25 22:52 sybsystemprocs.07-25-02-225247
Jul 26 22:53 sybsystemprocs.07-26-02-225300
Jul 27 22:53 sybsystemprocs.07-27-02-225329
Jul 28 22:53 sybsystemprocs.07-28-02-225302
Jul 29 22:53 sybsystemprocs.07-29-02-225338
Jul 30 22:53 sybsystemprocs.07-30-02-225335
Jul 31 22:53 sybsystemprocs.07-31-02-225318
How can a script do the following:
1. Show the list of databases to choose from (master,ntcss_org,supply or sybsystemprocs)
2. Given the choice automatically print out the most recent database error log