trying to read batch process but need some command help


View Poll Results: did you lie about saying you are a 'unix expert'?
no--No i lied but hope Unix.com will help me 1 100.00%
yes- i am fully experienced in Unix 0 0%
Voters: 1. This poll is closed

 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting trying to read batch process but need some command help
# 1  
Old 11-19-2003
trying to read batch process but need some command help

I am trying to access batch process that take place each nite. I am using Solaris 5.8 (and i am used to redhat). however I am trying to access say a certain directory.

The home/oradev , is the directory...in there i am trying to access say a batch file within this, how can see if they are in that directory.
I have done a Ls -ltr which displays everthing...how can i determine the bathc files ,

for example home/oradev dir contains:
-rw-r--r-- 1 oradev dba 6608 May 28 2002 temp_DEV_tanga.txt
drwxr-xr-x 2 oradev dba 512 May 29 2002 templbac
-rw-r--r-- 1 oradev dba 6698 May 30 2002 config_DEV.txt
drwxr-xr-x 3 oradev dba 512 May 30 2002 rapidinstall
drwx------ 2 oradev dba 512 Jun 17 2002 nsmail
drwx------ 2 oradev dba 512 Jun 24 2002 Mail
-rw-r--r-- 1 oradev dba 48195 Jul 1 2002 ETLdbms.lst
-rw-r--r-- 1 oradev dba 708608 Jul 1 2002 ASTCUTM1_v0_2.fmb
-rw-r--r-- 1 oradev dba 12318 Aug 17 2002 afiedt.buf
-rw-r--r-- 1 oradev dba 94956 Nov 7 2002 EUROST02.fmx
-rw-r--r-- 1 oradev dba 77824 Nov 15 2002 EUROST07.rdf
-rw-r--r-- 1 oradev dba 507904 Dec 5 2002 gjn.fmb
-rw-r--r-- 1 oradev dba 520192 Dec 6 2002 EUROST02.fmb
-rw-r--r-- 1 oradev dba 590 Jan 28 2003 forms_env
-rw-r--r-- 1 oradev dba 1024 Jan 28 2003 Data_Patch_0_10.tar
-rw-rw-r-- 1 oradev dba 878 May 28 16:48 file_sys.temp
-rw-r--r-- 1 oradev dba 201921 Sep 9 14:17 Release_v_0_2_5.tar.Z
-rw-r--r-- 1 root other 0 Oct 8 11:45 t
-rw------- 1 oradev dba 0 Oct 8 14:57 dead.letter


what does this do also:?
echo $1

any ideas...

Cheers
# 2  
Old 11-19-2003
Hope I didn't misunderstand your meaning.

if [[ -f /home/oradev/batch_file ]]; #check batch file exist or not
then
echo "File exists!" #do something here
else # If file not found
echo "File not exists!" #do something here
fi

about your second question. if you have a file called show_var and it contains "echo $1". Then,

show_var "hello world"

hello world #Output here
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Start process on X number of files and then wait for the next batch

Thanks for RudiC for his extraordinary help on organizing files in a batch of 10 using below code. FL=($(ls)); for ((i=0;i<=${#FL};i++)); do for j in ${FL:$i:10}; do $batch ${j} ${j}.txt done; echo "Pausing for next iteration"; echo... (6 Replies)
Discussion started by: busyboy
6 Replies

2. Shell Programming and Scripting

Process to read a new file entry and execute a command

I need to develop a process/daemon which will constantly monitor a file for new entry and execute a command. for eg, there is a file /var/log/inotify.log When a new entry like below gets appeneded to this file, execute the command as follows. /home/user/public_html/bad.php|CREATE ... (2 Replies)
Discussion started by: anil510
2 Replies

3. Solaris

Python script not working in batch process

Good morning, I have a python 2.3 script that runs stand alone as intended when tested, then it was put into a ksh script. when running the ksh script it runs as intended. The problem is that my script does not run when the ksh script is called by another user who runs a batch process (as of right... (1 Reply)
Discussion started by: mhahe
1 Replies

4. Shell Programming and Scripting

Using Make to batch process files

Hello all, I have a make question, and I was hoping somebody here might be able to point me in the right direction. Here is my issue; I have a command-line tool that I use to run a conversion on an input XML file that results in an output binary file. However, this particular tool needs to... (1 Reply)
Discussion started by: jujumbura
1 Replies

5. Shell Programming and Scripting

Processing different jobs as a batch process

Hi All, I want to process consecutive jobs in a sequence but when I execute 1 job ,the control does not return to the command prompt to continue with the next job. Can anyone help me here? Thanks (3 Replies)
Discussion started by: Taranjeet Singh
3 Replies

6. Shell Programming and Scripting

read input file for batch job

hi all, I am a newbie in unix shell script. May I know how to write a bacth job to read a list of files afrom the inout file and do the chmod ? Thanks. i.e. inside input.txt ==== a.txt b.txt c.txt and I want to write a batch job to read the input .txt and do the chmod 755 for all 3... (14 Replies)
Discussion started by: kinmak
14 Replies

7. Shell Programming and Scripting

User Prompt during batch script process

The script below performs an incremental database backup. When the increment backup is out of sequence, the process prompts the user: "Incremental backup out of sequece. Do you wish to continue? Y or N". This script is set to run as a scheduled process in background mode. When the script... (2 Replies)
Discussion started by: bond007jlv
2 Replies

8. Shell Programming and Scripting

Read the lines from the file in batch

Hi, I want to read lines in a loop. eg. In a file with 100 lines..first I want to read first 1 to 10 lines and redirect it to other file, then next 10 lines ( 11 to 20 ) and redirect it to the file ... .till end of file. I am not sure how to achieve this.Need help. (2 Replies)
Discussion started by: amitraorane
2 Replies

9. Shell Programming and Scripting

Using Batch command

Hi All I have a need due time constraint to issue the mail command in background. I have a script that sends a message to a mail address as follows :- echo "$MLINE" | mail -s "$HOST - $TEXT" name@co.com & The script runs frequently and I check to see if the script is active and if it is , it... (5 Replies)
Discussion started by: jhansrod
5 Replies
Login or Register to Ask a Question