Sponsored Content
Top Forums Shell Programming and Scripting Need help to write a shell script ASAP Post 302519733 by bhagya3001 on Thursday 5th of May 2011 12:22:45 AM
Old 05-05-2011
Need help to write a shell script ASAP

Hi,

1) Need help to write script in KSH to detect a duplicate file.
2) The original file needs to be moved from current path to a different path
3) The duplicate file should continue to stay in the same path.

Exact file names & duplicate file names are given below. Please help me at the earliest.


drwxrwxrwx 4 tcpadmin tcpadmin 5120 Apr 20 10:00 tmp
-rw-r--r-- 1 bpa develop 27068910 May 3 00:07 042728840_scpm-042728840-user_problem_summary-_20110503_120728372.txt
-rw-r--r-- 1 bpa develop 7020298 May 3 00:14 042728840_scpm-042728840-supplier_cycle_time-_20110503_121412886.txt
-rw-r--r-- 1 bpa develop 54866475 May 3 00:14 042728840_scpm-042728840-ppff_collab-_20110503_121449501.txt
-rw-r--r-- 1 bpa develop 35422167 May 3 00:17 042728840_scpm-042728840-collab_attribute-_20110503_1217397.txt
drwxr-xr-x 2 bpa develop 24576 May 3 21:25 backup

-rw-r--r-- 1 bpa develop 27075335 May 4 00:01 042728840_scpm-042728840-user_problem_summary-_20110504_120104176.txt
-rw-r--r-- 1 bpa develop 8007433 May 4 00:05 042728840_scpm-042728840-supplier_cycle_time-_20110504_120556132.txt
-rw-r--r-- 1 bpa develop 54866475 May 4 00:06 042728840_scpm-042728840-ppff_collab-_20110504_120629727.txt
-rw-r--r-- 1 bpa develop 35422167 May 4 00:09 042728840_scpm-042728840-collab_attribute-_20110504_120915727.txt
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need rm script help ASAP

I need your expertise anyone. I'm trying to remove part of a id # in a script. Reason, the part of the id is a underscore that is making my life impossible. I simply cannot handle all the requests and modify every single one in vi or edt. So I wanted to modify the script.. For example ... (12 Replies)
Discussion started by: simon2000
12 Replies

2. Shell Programming and Scripting

need help to write shell script

. I wrote shell script with help to extract data and generate report . I need help to modify that in sub section . Currently I am generating the report in this format Version Name Host Total Number of Fails 10 Animator 45 10 Krachel ... (0 Replies)
Discussion started by: getdpg
0 Replies

3. Shell Programming and Scripting

I need to write a shell script.

Hi Guys, I need to write a shell script, to which I have getting results from CPU and Memory Utilization. This is to generate automatically through Shell script by running cron job. Is it possible to write it. I am new to this shell scripting. Can you please help me on this ASAP. ... (6 Replies)
Discussion started by: lakshmanrk
6 Replies

4. Shell Programming and Scripting

Need to Write Shell Script based off of this shell command

I'm trying to read a bunch of log files and output the lines that contain particular strings. To accomplish this, I've been running the following from the command line: find . -name "*" | xargs grep " " | grep " " > output.txt Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies

5. Shell Programming and Scripting

how to write shell script

Hi , i need to write a script like this In 1.sh ./test.sh wait(5sec) send ctrl+C to server ./testxxxx.sh first i need invoke test.sh from 1.sh , after wating for some time i need to close the test.sh script & i need to start new script i tried to invoke script... (2 Replies)
Discussion started by: pvr_satya
2 Replies

6. Shell Programming and Scripting

NEED HELP FROM SHELL EXPERTS ASAP ..Compare of two files

I have seen the old forums before posting this thread...I did not find the designated answer for my shell script... I am novice in shell programming: Can some one help on how i can loop with in the loop when comparing two files... I need to compare ID in File1 with IDs in File2...If the ID... (1 Reply)
Discussion started by: rspotula
1 Replies

7. Shell Programming and Scripting

Need to write a shell script

Hi, I need some help to write a script i need to write script that will count the no of logs generated for the day and specify the logfiles names which is not generated for the day. Default no of log generate per day is 29 if less than 29 logs generated it should specify the perticular logfile... (7 Replies)
Discussion started by: mail.chiranjit
7 Replies

8. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

9. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

10. Shell Programming and Scripting

Please help me to write the shell script

Please help me to write the shell script AC|NAME|STATE|MAXVALUE|MINVALUE---------heading 111|UMA|ODISHA|123,00.00|54.00 111|UMA|ODISHA|124,00.00|25.00 111|UMA|ODISHA|114,00.00|58.00 111|UMA|ODISHA|104,00.00|00.00 111|UMA|ODISHA|194,00.00|19.00 111|UMA|ODISHA|184,00.00|64.00... (5 Replies)
Discussion started by: alokjyotibal
5 Replies
SHUNIT2(1)																SHUNIT2(1)

NAME
shunit2 - A unit test framework for shell scripts SYNOPSIS
shunit2 unitfile DESCRIPTION
shUnit2 is a xUnit unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc.. If you have ever had the desire to write a unit test for a shell script, shUnit2 can do the job. You can either run shunit2 directly from the commandline and specify the unit file or directly source the shunit2 executable. If you directly execute shunit2 and don't specify a unitfile shunit2 assumes a empty testfile and will return without an error message. EXAMPLE
Simple script to test if 1 equals 1 #! /bin/sh testEquality() { assertEquals 1 1 } # load shunit2 . shunit2 Execute shUnit2 unit tests directly from the commandline shunit2 /path/to/unit/file OPTIONS
shunit2 does not support any commandline options at all. You can either source shunit2 to execute your unit tests or directly run shunit2 as a commandline script. SEE ALSO
For more information see http://code.google.com/p/shunit2/ or have a look at the installed documentation in /usr/share/doc/shunit2/ AUTHOR
shunit2 was written by Kate Ward <kate.ward@forestent.com>. This manpage was written by Ulrich Dangel <mru@spamt.net>. 2.1.6 03/25/2012 SHUNIT2(1)
All times are GMT -4. The time now is 07:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy