Shell script to find the wrong filename in a path and raise a trap for it


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script to find the wrong filename in a path and raise a trap for it
# 1  
Old 09-04-2014
Shell script to find the wrong filename in a path and raise a trap for it

Example:
I have server name A with an IP : 125.252.235.455
I have an username /password to login into this server under SSH connection
In this server i have a path /apps/user/filename(Big.txt) [example]
Everyday we used to get the filename as Big.txt.

I want a shell script to monitor this path daily. If we receive any filename other than Big.txt , The shell script should highlight the new filename by saving it another log file.
If any file comes into that log file, it should raise an autoclarify incident trap via Bridge clarify. Command i use for trap :
Code:
filter .*([9][0-4])% (.*|$) -> sysFailureMajor ->; AUTOCLARIFY:Applicationqueuename:2 APPID:APP19191 File mismatch - Raise P2 to Applicationqueuename-> SMM_storage;

---------- Post updated at 09:33 AM ---------- Previous update was at 09:30 AM ----------

Can anyone help me out quickly for the above request please?
# 2  
Old 09-04-2014
If you are talking of amdocs clarify crm, then this is the wrong forum...

If you want help to check the presence of a file called Big.txt, that can be done, but the code you submitted I doubt anybody here looking at shell stuff be inspired...You will have to look in your specific product for support...
# 3  
Old 09-05-2014
Okay sory folk....Please omit the trap section. Just reply to the below request alone.

I have server name A with an IP : 125.252.235.455
I have an username /password to login into this server under SSH connection
In this server i have a path /apps/user/filename(Big.txt) [example]
Everyday we used to get the filename as Big.txt.

I want a shell script to monitor this path daily. If we receive any filename other than Big.txt , The shell script should highlight the new filename by saving it another log file.
# 4  
Old 09-05-2014
Hi,

What do you have at the moment?

Regards

dave
# 5  
Old 09-05-2014
I dont have anything thats y asking ....its ok
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script - Remove the 3 top level of a full path filename

Hello. Source file are in : /a/b/c/d/e/f/g/some_file Destination is : /d/e where sub-directories "f" and "g" may missing or not. After copying I want /a/b/c/d/e/f/g/file1 in /d/e/f/g/file1 On source /a is top-level directory On destination /d is top-level directory I would like... (2 Replies)
Discussion started by: jcdole
2 Replies

2. Shell Programming and Scripting

Shell script to set trap for finding cron job failures

Unix box: solaris 5.8 Server: IP Need to to set trap for cron job failures by writing a shell script (5 Replies)
Discussion started by: ChandruBala73
5 Replies

3. Shell Programming and Scripting

Trap Oracle error in shell script

sqlplus -s usrname/password@dbSID <<-SQL >> logfile @create_table.sql commit; quit; SQL I am running this script to execute an sql file. I want to display the oracle error if anything found during execution of the sql file and exit from script. Please suggest How do it. (1 Reply)
Discussion started by: millan
1 Replies

4. Shell Programming and Scripting

Check my script and correct the find command if wrong

Hello All, Here I am trying to find all the directories whose name starts with EFS or HOTFIX like in below example and below is my code but I don’t know why this is not working correctly. drwxr-xr-x 3 qabuild denccefs 4096 Sep 23 21:36 EFS110929A_SOURCE/ -rwxrwxr-x 1 qabuild... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

5. Shell Programming and Scripting

Please help I want script to check filename, size and date in specify path.

Please help, I want script to check filename, size and date in specify path. I want output as: DATE: YYYYMMDD HH:MM ------------------------------------------------ fileA,filesize,yyyy mm dd HH:MM fileA,filesize,yyyy mm dd HH:MM fileA,filesize,yyyy mm dd HH:MM fileA,filesize,yyyy mm dd... (1 Reply)
Discussion started by: akeji
1 Replies

6. Shell Programming and Scripting

How trap a signal in shell script?

Hi , i have a scenario where...i have to put a check where if script is executing more than 15mins i have to kill that script and n retry again 2nd time. i this case i can use background process to do it but i feel trap will be the efficent way to do so... but i dont know much about it... (1 Reply)
Discussion started by: crackthehit007
1 Replies

7. UNIX for Advanced & Expert Users

trap ctrl c in shell script

how to trap the ctrl c in unix shell script my script is running in while loop it should not be terminate with ctrl c. if i press ctrl c while running script it shloud ignore the same. please healp.......... thanks in advance (2 Replies)
Discussion started by: arvindng
2 Replies

8. Shell Programming and Scripting

Recursive call to find files and directories in Shell script from current path.

################################################################ Copy this script to your path from where you want to search for all the files and directories in subdirectories recursively. ################################################################# code starts here... (2 Replies)
Discussion started by: Ramit_Gupta
2 Replies

9. Shell Programming and Scripting

how to find the path of a file when it is passed as ....filename(parameter) to script

hi unix guru's..................:confused: question is posted in the #3 permalink shown below. (3 Replies)
Discussion started by: yahoo!
3 Replies

10. UNIX for Advanced & Expert Users

how to use trap command in shell script

Right now I have implemented autossh between ServerA & ServerB which are sun solaris based. I have made this shell script. I am facing one problem which I am going to discuss now. The problem is when I sftp some files (suppose there is 10 files I have to transfer through sftp) from one server to... (2 Replies)
Discussion started by: girish.batra
2 Replies
Login or Register to Ask a Question