08-05-2008
My script is:
cd /app/chdata/workflow/suppl/esoutput/spd/flatfile
sort testfile1.txt | awk '{ file=substr($0,1,2)".txt"; print >> file }'
This script reads particular file named testfile1.txt and sorts the records and splits them as per some condition.
Now, instead of hardcoding one file say testfile1.txt, I want to modify this script where it reads all the files in the directory /app/chdata/workflow/suppl/esoutput/spd/flatfile and does the above logic.
Can anyone modify my script so that my requirement is fulfilled?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Actually I have a file which consists data . for eg names.
Then I want my sql query to read this file and produce the output.
Currently I am using this
FOR EG : FILENAME is NAMES
for i in `cat NAMES`
{
sqlplus -s $CONNECTID << EOF
spool rooh
set heading off
select... (1 Reply)
Discussion started by: rooh
1 Replies
2. Shell Programming and Scripting
Hi
I have around 100 users in sun server and have default home directory in /usr/home/<username>
I want to clean their home directory time to time to make free space on root, as users generate many output files during usage of application.
My idea is, generate a file with following command... (4 Replies)
Discussion started by: ishir
4 Replies
3. Shell Programming and Scripting
Hi,
I have to write a KSH script to loop through the directory and transfer all the files through FTP. The source machine is the Network shared drive and the files in the directory needs to be FTPied to the UNIX server.
For eg. Directory (Datasource)
+ Directory1
... (6 Replies)
Discussion started by: mahalakshmi
6 Replies
4. Shell Programming and Scripting
I run into a issue when I try to do sorting of the following with ascending order, one round of for looping seems not working, anyone knows how to use shell or perl?
$array = (5,0,3,2,7,9,8) (2 Replies)
Discussion started by: ccp
2 Replies
5. Shell Programming and Scripting
Hello, where can I get usefull information on the use of looping with for , if and while with extensive examples.
Also use of variables in scripts (1 Reply)
Discussion started by: sam4now
1 Replies
6. Shell Programming and Scripting
vesselNames values:
xxx
yyy
zzz
vesselPlanned values:
xxx
zzz
zzz
zzz
OIFS=""
OIFS=$IFS
IFS="\n" (2 Replies)
Discussion started by: finalight
2 Replies
7. Shell Programming and Scripting
Hi everyone,
I am having trouble looping through entries in a file. The file several entries that are separated by topics e.g.
<Topic r:id="Top/World/Français">
</Topic>
<Topic r:id="Top/World/Français/Actualité">
</Topic>
<Topic r:id="Top/World/Français/Actualité/A_la_Une">
<link... (1 Reply)
Discussion started by: BlueberryPickle
1 Replies
8. Shell Programming and Scripting
Hi evryone
i need a help .
i have a file xcv.the content is :
accelerate
i want a script which will run 1000 times in loop and changing the value to
accelerate to
acceler
in 1st loop and in 2nd loop it will be again
accelerate and so on . (6 Replies)
Discussion started by: Aditya.Gurgaon
6 Replies
9. Shell Programming and Scripting
so when i use rm file -i vv bb i can delete the first file vv but i cant seem to delete the second file bb as i tried to use shift on it, but it seems that it delete the first one and stops it without looping it to the next file. what is wrong with my coding ?
#!/bin/bash
function... (3 Replies)
Discussion started by: cman123
3 Replies
10. Shell Programming and Scripting
Hey guys, so I am trying to do a loop script that will go through each folder (no gui so just each domain has a folder) and grab out the databases being used on that domain. I know I would use
mysql -e "show databases where not 'information_schema';" once in each directory to pull the actual... (3 Replies)
Discussion started by: dough
3 Replies
LEARN ABOUT DEBIAN
pegasus-remove
PEGASUS-REMOVE(1) PEGASUS-REMOVE(1)
NAME
pegasus-remove - removes a workflow that has been planned and submitted using pegasus-plan and pegasus-run
SYNOPSIS
pegasus-remove [-d dagid] [-v] [rundir]
DESCRIPTION
The pegasus-remove command remove a submitted/running workflow that has been planned and submitted using pegasus-plan and pegasus-run. The
command can be invoked either in the planned directory with no options and arguments or just the full path to the run directory.
OPTIONS
By default pegasus-remove does not require any options or arguments if invoked from within the planned workflow directory. If running the
command outside the workflow directory then a full path to the workflow directory needs to be specified or the dagid of the workflow to be
removed.
pegasus-remove takes the following options:
-d dagid, --dagid dagid
The workflow dagid to remove
-v, --verbose
Raises debug level. Each invocation increase the level by 1.
rundir
Is the full qualified path to the base directory containing the planned workflow DAG and submit files. This is optional if
pegasus-remove command is invoked from within the run directory.
RETURN VALUE
If the workflow is removed successfully pegasus-remove returns with an exit code of 0. However, in case of error, a non-zero exit code
indicates problems. An error message clearly marks the cause.
FILES
The following files are opened:
braindump
This file is located in the rundir. pegasus-remove uses this file to find out paths to several other files.
ENVIRONMENT VARIABLES
PATH
The path variable is used to locate binary for condor_rm.
SEE ALSO
pegasus-plan(1), pegasus-run(1)
AUTHORS
Gaurang Mehta <gmehta at isi dot edu>
Jens-S. Vockler <voeckler at isi dot edu>
Pegasus Team http://pegasus.isi.edu
05/24/2012 PEGASUS-REMOVE(1)