Welcome to iraf.net Monday, May 13 2024 @ 12:37 AM GMT
piverson |
07/25/2007 02:38PM (Read 3316 times)
|
|
|
Status: offline
Registered: 07/10/2007
Posts: 42
|
I have tried various ways of writing the pconcat call in my script but all have syntax errors. Below is the sample script. Thanks for your help.string s1
string s2
string s3
string s4sections ("a-ngc*.fits", opt="fullname", > "datalist1")
match (".fits.","datalist1",stop+,>"datalistfile")
sed 's/.fits/.fits.nst.1/g' "datalistfile" > "datalistnst"
sed 's/.fits/.fits.nrj.1/g' "datalistfile" > "datalistnrj"
sed 's/.fits/.concat/g' "datalistfile" > "datalistcon"
joinlines "datalistfile" "datalistnst" > "datatot"
joinlines "datatot" "datalistnrj" > "datatota"
joinlines "datatota" "datalistcon" > "datatotal"
list = "datatotal"
while (fscan(list,s1,s2,s3,s4) != EOF){
pconcat (s2),(s3) (s4)
}
del data*
|
|
|
|
fitz |
07/25/2007 02:38PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
I'm not quite sure what your script is trying to do, but in general variables would be passed to script calls using e.g.[code:1:4aa968c53a]pconcat (s2, s3, s4)[/code:1:4aa968c53a]But note there are only two required args to PCONCAT which is why I'm confused! Otherwise, for tasks that lists you can use @-files with a single call instead of a loop, e.g.[code:1:4aa968c53a]pconcat ("@"//s2, s3)[/code:1:4aa968c53a]would concatenate all the files in 's2' into the 's3' output database.-Mike
|
|
|
|
piverson |
07/25/2007 02:38PM
|
|
|
Status: offline
Registered: 07/10/2007
Posts: 42
|
Mike, I am trying to concatenate the file in s2 (i.e. a-ngc7762-00127.fits.nst.1) and the file in s3 (i.e. a-ngc7762-00127.fits.nrj.1) and call the output s4 (i.e. a-ngc7762-00127.concat). Essentially I am attempting to follow the example in the help files but am having trouble with the syntax.Thanks,
Paul
|
|
|
|
fitz |
07/25/2007 02:38PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
In that case, try [code:1:a185961878]pconcat (s2//","//s3, s4)[/code:1:a185961878]Comma-delimited lists work the same as @-files, the // operator is the CL script string concatenation, the result will be written to the file named in s4.-Mike
|
|
|
|
| |
|
Content generated in: 0.14 seconds |
|