Welcome to iraf.net Monday, May 13 2024 @ 12:37 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Proper syntax of pconcat when used in script
   
piverson
 07/25/2007 02:38PM (Read 3316 times)  
+++--
Chatty

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*

 
Profile Email
 Quote
fitz
 07/25/2007 02:38PM  
AAAAA
Admin

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

 
Profile Email
 Quote
piverson
 07/25/2007 02:38PM  
+++--
Chatty

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

 
Profile Email
 Quote
fitz
 07/25/2007 02:38PM  
AAAAA
Admin

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

 
Profile Email
 Quote
   
Content generated in: 0.14 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login