Script for daily use


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for daily use
# 1  
Old 01-15-2013
Wrench Script for daily use

I have a clear case command for example.
ct lsprivate -co
this displays the list of checked out files.
and i have many views where i work daily

I need a script which can run daily at our specified time. setting each and every view i have and list the check outs i have in them. and consolidate it in a single file.
and it should also tell how many days old is the check out file is.

for instance the output should be like this.

Code:
view name 1
checked out file name 1, 2 days old
checked out file name 2, 10days old
.....
checked out file name n, ndays old

view name 2
no check outs

view name n


please help with this..
# 2  
Old 01-16-2013
Quote:
Originally Posted by Syed Imran
I need a script which can run daily at our specified time. setting each and every view i have and list the check outs i have in them. and consolidate it in a single file.
and it should also tell how many days old is the check out file is.

for instance the output should be like this.

Code:
view name 1
checked out file name 1, 2 days old
checked out file name 2, 10days old
.....
checked out file name n, ndays old

view name 2
no check outs

view name n


please help with this..
Have you done anything on this?? It seems like you are asking out for a whole new script! Smilie
# 3  
Old 01-16-2013
not yet... provide me idea on how this could be done.. how to set views and list checkout in parallel and how to make it run daily at specified time
# 4  
Old 01-16-2013
What is the output of
Code:
ct lsprivate -co

How did you come up with this output format?
Code:
view name 1
checked out file name 1, 2 days old
checked out file name 2, 10days old
.....
checked out file name n, ndays old

view name 2
no check outs

view name n

# 5  
Old 01-16-2013
cleartool lsprivate -co
will display the full path of the files that are checkout
# 6  
Old 01-16-2013
Can you paste the sample output please??
# 7  
Old 01-16-2013
Code:
cleartool setview viewname1
cleartool lsprivate -co
/mvfs/he/scripts/run_pem_cfg_unit_test  [checkedout]
/mvfs/he/scripts/test_pem_cfg_ut.exp  [checkedout]

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run script no more than twice daily WITHOUT cron

Can I run a script no more than twice a day without using cron? Maybe create a file when script is first run and check its date? (7 Replies)
Discussion started by: drew77
7 Replies

2. UNIX for Beginners Questions & Answers

/etc/cron.daily script is not being executed

Hi All I have created a file in /etc/cron.daily on redhat linux 7.3 version host called applicationscript cat applictaionscript #!/bin/bash /prod/data/routine.sh cat /prod/data/routine.sh #!/bin/bash #details regular=/prod/data/jboss/logs backup=/prod/data/logs #echo "Moving logs"... (3 Replies)
Discussion started by: anil529
3 Replies

3. Shell Programming and Scripting

Script to count files on daily basis

Hi all I need to count files on a daily basis and send the output via email, what I am currently doing its simply running the following:ls -lrt *.cdr | awk '{if(($6 == "Jul") && ($7 == "13")) print $0}' | wc -l, which in this case it will count all files with extension "cdr" from the month of... (13 Replies)
Discussion started by: fretagi
13 Replies

4. Shell Programming and Scripting

Script to move file on a daily basis

Hi! Please I need help on the a script that would pick one file in a directory, change its name, them change its permissions, them move to a different directory, but has to be done on a daily basis, and the file that is being moved to its final destination has to have the following format:... (7 Replies)
Discussion started by: fretagi
7 Replies

5. Red Hat

UNIX script for daily file transfer ???

I need to create a script which needs to transfer the "<filename>+yyyymmdd".dat file from a unix machine to a linux machine.. daily. we can use an active batch to schedule the script. however, the script needs to detect if the new file is present, if present, then transfer. any help ?? (1 Reply)
Discussion started by: ravikodi
1 Replies

6. Shell Programming and Scripting

Help me with daily monitoring script

find /usr/IBM/FileNet/BulkUploaderScript/$i/Log/SuccessLog \( -newer range_start -a \! -newer range_end \) -exec wc -l {} \; |awk '{total+=$1-1} END {print total}' >>$LOGFILE I need to print time stamp of the files int the paticular period .Please modify the above script so that i get... (34 Replies)
Discussion started by: RaghavendraT
34 Replies

7. Shell Programming and Scripting

Daily health check script

Hi I am still learning how to write shell scripts, so I started to write a script like this: #!/bin/sh date echo outputOK () { echo $1 "" } outputOK () { echo $1 "" } for vol in `/usr/bin/grep -E 'hfs|vxfs|nfs|cifs' /etc/fstab | egrep -v '^#' | awk '{ print $3 }'` do if... (7 Replies)
Discussion started by: fretagi
7 Replies

8. Shell Programming and Scripting

Help with Daily DB growth script

Hello, I have a script SELECT TO_CHAR(creation_time, 'RRRR Month') "Month", SUM(bytes)/1024/1024 "Growth in MB" FROM sys.v_$datafile WHERE creation_time > SYSDATE-365 GROUP BY TO_CHAR(creation_time, 'RRRR Month') / It produces output similar to this Month ... (2 Replies)
Discussion started by: jnrpeardba
2 Replies

9. UNIX for Dummies Questions & Answers

Run a .sh script daily

Hi, I juat wondering how can you set it up so that .sh files will execute automatically once a day. from google I've got use crontab but when I type this into my session it say I am not allowed to use this programme. Any other ways to achieve what I'm looking for? thanks (1 Reply)
Discussion started by: blackieconnors
1 Replies

10. UNIX for Dummies Questions & Answers

Need a script to do daily backups

So I have a set of directories and files that I need to backup from /directory1/ to /directory2/ each night. I have some UNIX/SSH knowledge but don't assume I know a whole lot b/c I would hate to screw something up. Here's the knowledge I have: I can access my server via SSH and can navigate to... (10 Replies)
Discussion started by: JPigford
10 Replies
Login or Register to Ask a Question