Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 14, 2010, 6:35 pm
rate this thread
I would like to use a perl format statement to autogenerate qsub files
for a PBS scheduler. The files I need to generate are essentially
shell scripts with comments beginning with a hash mark to denote them
as pragma for the scheduler.
If I create a format statement that looks like
format QSUBFILE =
#PBS -N @<<<<<<<<<
the line beginning with a hash mark is read as a comment by PERL,
instead of a line that needs to be printed that starts with a hash
How can I using a PERL format statement generate a number of files all
of which has as their first few lines variations of
#PBS -N dustfit
#PBS -q default
#PBS -l nodes=1:ppn=8
#PBS -l cput=6000:00:00
Re: perl format statement, how do I begin a line with a hash mark?
I thought about that, but the file has a space in the line that breaks
the way the file is parsed by the scheduler. I need the first
character of the line to be a hash. I can do this with print or printf
statements easily enough, but I am trying to come up with a solution
where the format statement looks as much as possible like the files my
end-users (who tend to ask things like "what is backslash n again?")
are used to dealing with so that this is easier to do in the future.
- » Re: perl format statement, how do I begin a line with a hash mark?
- — Next thread in » PERL Discussions
- » FAQ 8.21 Where do I get the include files to do ioctl() or syscall()?
- — Previous thread in » PERL Discussions