03-07-2008
Process id's in file names
Hello,
I am editing a script which has a .sh extension but is listed as #! /bin/ksh that has output files where process ID's are somehow getting tacked onto the end of the filename. The programmer codes these scripts as "/tmp/email_file$$" saying that he put the $$ in there to be able to handle the process ID that unix seems to want to give it. I have never see this or had problems with this in the past in my other job - is there a way to output these files so that the process ID isn't produced at the end of the file? Or do I have to put $$ at the end to accomodate it?
Thanks,
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I'm trying to display all process on an AIX server with the string SLRServer in them. Normally "ps -ef|grep SLRServer" would be sufficient, however in this instance the process name is enormous and the part which contains this string has been truncated, as you can see in the example below
... (8 Replies)
Discussion started by: m223464
8 Replies
2. Shell Programming and Scripting
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
3. Shell Programming and Scripting
i want shell script who can eliminate those repeated process and get value of top process of second column.
Mark with red one only i want other repeated process should be eliminate but how? Help me out guys.
oracle 496094
oracle 471572
oracle 471497
oracle 470561
ko9coll 96157... (4 Replies)
Discussion started by: siddiqui
4 Replies
4. Shell Programming and Scripting
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies
5. Programming
#include <stdio.h>
#include <string.h>
int main(void)
{
char buf;
int transcount=0, elapsetotal=0;
while(!feof(stdin))
{
int newoluf=0, elapsetime=-1;
char timestamp={0};
buf='\0'; // Blank out... (2 Replies)
Discussion started by: sena
2 Replies
6. Shell Programming and Scripting
Hi all,
I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example:
... (2 Replies)
Discussion started by: cul8er
2 Replies
7. Shell Programming and Scripting
Hi,
I have a files in a directory as below :-
ls -1
mqdepth-S1STC02
proc-mq-S1STC01
proc-mq-S1STC02
proc-mq-S1STC03
Whereever i have S1STC i need to copy them into new file with file name S2STC.
expected output :-
ls -1
mqdepth-S2STC02
proc-mq-S2STC01
proc-mq-S2STC02... (3 Replies)
Discussion started by: satishmallidi
3 Replies
8. Shell Programming and Scripting
HI Guys,
I have some 8 files with different name and extensions. I need to check if they are present in a specific folder or not and also want that script to show me which all are not present. I can write if condition for each file but from a developer perspective , i feel that is not a good... (3 Replies)
Discussion started by: shankarpanda003
3 Replies
9. Shell Programming and Scripting
Data files coming in different names in a file name called process.txt.
1. shipments_yyyymmdd.gz
2 Order_yyyymmdd.gz
3. Invoice_yyyymmdd.gz
4. globalorder_yyyymmdd.gz
The process needs to discard all the below files and only process two of the 4 file names available
... (1 Reply)
Discussion started by: dsravanam
1 Replies
10. Shell Programming and Scripting
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues:
1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies
LEARN ABOUT DEBIAN
gpiv_series
GPIV_SERIES(1) General Commands Manual GPIV_SERIES(1)
NAME
gpiv_series - Script for (parallel) processing a series of numbered files.
SYNOPSIS
gpiv_series [-a | --arg_n] [-b | --basename FILE] [-e | --ext ext] [-f | --first N] [-l | --last N] [-i | --incr N] [-x|| --prefix] [-h |
--help] [-n | --none] [-p | --print] [--pad] "process -key1 ..."
DESCRIPTION
gpiv_series processes a series of numbered files. If no parameters are defined at the command line, standard parameters will be used that
are defined in the script. Principally, any program or script may be invoked by gpiv_series. "Process" is a string which represents the
name of the program to be executed, including eventually command line options and arguments. The file to be processed, as constructed from
-b c.s., will be appended to the "process" string. If the program has to be feeded with -f "filename", write -f at the end of the string.
When using the parallelised version, mpipython is invoked and the script may be launched with mpirun. The script needs that all input files
are accessible on each node by copying all data or by (NFS) mounting the File System containing the input data on each node.
This program does not use the parameter resources from libgpiv.
Options
-a | --arg_n
If the process needs the current number in its argument list instead of prepending/appending it to the FILE, the number will be put
before (-f) filename in the "process" string.
-b | --basename FILE
The FILE has to be given without its extension. FILE represents the file name without its number. It is supposed that the leading or
ending number in the filename is the counter that will be applied by gpiv_series when processing.
-e | --ext EXT
add an extension EXT after the filename (without the leading ".") in "process".
-f | --first N
Defines the counter N of the number at which the analyses starts. Default: 0.
-l | --last N
The last number N that will be processed. Default: 0.
-i | --incr N
Increment number with N. Default: 1. This might be useful, for example, if subsequent numbered images are combined for cross-corre-
lation with the gpiv_img2gpiv tool.
-x | --prefix
Use prefix numbering to file basename.
-h | --help
On-line help.
-n | --none
Suppresses real execution, only prints the process to stdout.
-p | --print
Prints the process to be performed on each file to stdout.
--pad N
Padding a number with N zero's when combining with the filename.
SEE ALSO
gpivtools
NOTES
AUTHOR
Gerber Van der Graaf
BUGS
The parallelised script has only been tested with the LAM version of mpipython.
19 Januari 2005 GPIV_SERIES(1)