Sponsored Content
Full Discussion: Scripting job to complete
Top Forums Shell Programming and Scripting Scripting job to complete Post 302514635 by palanisvr on Sunday 17th of April 2011 05:20:43 AM
Old 04-17-2011
Try this , I have developed the code w.r.t data provided by you .

Code:
#!/bin/ksh

for i in   `grep  -n "-" tempfile.dat |awk -F ':' '{print $1}'`
do
  echo  $i
  idx=`expr $i + 3`
  echo idx : $idx
  echo `sed -n  "$i","$idx"p tempfile.dat|awk  '{print $2}'|tr "\n" " " |awk -F ' ' '{print $1 "|" $2 "|" $3}'` >>newfile.dat
done


Last edited by Franklin52; 04-17-2011 at 11:00 AM.. Reason: Please indent your code and use code tags, thank you
This User Gave Thanks to palanisvr For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

start job after complete transfer....

Hi, I have a situation... I have a script it checks for a file in a folder which comes to the folder every day at specified time...2am to 4 am, once the file is in the polder my process starts...but the problem is the files being placed are huge and it is even taking half an hour for the file... (3 Replies)
Discussion started by: mgirinath
3 Replies

2. Windows & DOS: Issues & Discussions

windows scripting for a batch job

I have been doing unix scripting for quite awhile and there seems to be a wealth of information on it. Now I am working on migrating an intel based application to a new server. I need to modify some existing scripts, but am having trouble finding information on windows scripting, a forum similar... (2 Replies)
Discussion started by: MizzGail
2 Replies

3. UNIX for Advanced & Expert Users

At job in SHELL SCRIPTING

Hi I am using at job in my SHELL scripts.. When it prompts to enter the time for at job..I used to press enter(return) button.. After that its running the job properly, but its showing the below error UX:at: ERROR: Bad date specification.. Can some one suggest how to remove that error. ... (2 Replies)
Discussion started by: grajesh_955
2 Replies

4. Shell Programming and Scripting

How to schedule a job in shell scripting.

Hi all I have made a shell script to check jobs' status and send an alert based on the result. I want to run this script to run every 4 hours and I don't have access to cron. Can we schedule using shell scripting instead of cron facility? (2 Replies)
Discussion started by: johnl
2 Replies

5. Post Here to Contact Site Administrators and Moderators

Where can I download the VTC - Unix Shell Scripting Advanced complete video

Where can I download the VTC - Unix Shell Scripting Advanced complete video. I don't know in which thread I should post this question.Plz help me out, or just tell me the link in the reply to this post. Thanks in advance. (0 Replies)
Discussion started by: villain41
0 Replies

6. Shell Programming and Scripting

Unix Scripting : Sort a Portion of a File and not the complete file

Need to sort a portion of a file in a Alphabetical Order. Example : The user adam is not sorted and the user should get sorted. I don't want the complete file to get sorted. Currently All_users.txt contains the following lines. ############## # ARS USERS ############## mike, Mike... (6 Replies)
Discussion started by: evrurs
6 Replies

7. Windows & DOS: Issues & Discussions

AutoSys Job not waiting for script to complete

I'm not sure if this is the right place to post this issue...but here goes... I am converting a set of windows jobs from Control-M to AutoSys r11.3. The same command line is being executed in both systems. The Control-M job runs to compltion in about 1.5 hours, waiting for the entire batch... (3 Replies)
Discussion started by: ajomarquez
3 Replies

8. Shell Programming and Scripting

I want a script to view the complete log information of data stage job from UNIX IBM AIX.

Hi, I am working on data stage 8.7 version and I want a script a to view the all log information of the data stage job from UNIX environment. Can you please help me out by give the script. Thanks in advance... (7 Replies)
Discussion started by: victory
7 Replies

9. Shell Programming and Scripting

To refire a backup job using shell scripting..........

how to write a code using shell scripting to refire a back up job if it fails with an error code of 196? (7 Replies)
Discussion started by: Pawan Ramnani
7 Replies

10. UNIX for Beginners Questions & Answers

Automation script for email alert when a job get complete with status successful.

Guyz, Please let me know about script which is to be sending an automatic email to particular mail id's when a monotoring job get complete with status successful. (1 Reply)
Discussion started by: Rehan Ahmad
1 Replies
GLOBUS-JOB-CANCEL(1)						  GRAM5 Commands					      GLOBUS-JOB-CANCEL(1)

NAME
globus-job-cancel - Cancel a GRAM batch job SYNOPSIS
globus-job-cancel [-f | -force] [-q | -quiet] JOBID globus-job-cancel [-help] [-usage] [-version] [-versions] DESCRIPTION
The globus-job-cancel program cancels the job named by JOBID. Any cached files associated with the job will remain until globus-job-clean is executed for the job. By default, globus-job-cancel prompts the user prior to canceling the job. This behavior can be overridden by specifying the -f or -force command-line options. OPTIONS
The full set of options to globus-job-cancel are: -help, -usage Display a help message to standard error and exit. -version Display the software version of the globus-job-cancel program to standard output. -version Display the software version of the globus-job-cancel program including DiRT information to standard output. -force, -f Do not prompt to confirm job cancel and clean-up. -quiet, -q Do not print diagnostics for succesful cancel. Implies -f ENVIRONMENT
If the following variables affect the execution of globus-job-cancel. X509_USER_PROXY Path to proxy credential. X509_CERT_DIR Path to trusted certificate directory. University of Chicago 03/18/2010 GLOBUS-JOB-CANCEL(1)
All times are GMT -4. The time now is 07:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy