I'm configuring a kickstart profile and I'd like to create some script file.

I'm doing like this:

cat <<EOF >>/scripts/myfile.pl
#!/usr/bin/perl
...
my $int;
`useradd me`;
...
EOF

After the PXE boot and installation process, when I check the file, everything starting with "$", and line starting with backquote disappeared.

Back-slashing backquotes seems to have worked, but not $.

Is there a way to make this work ?

link|improve this question

54% accept rate
feedback

1 Answer

up vote 3 down vote accepted

Try: cat <<'EOF' >>/scripts/myfile.pl

This is a parameter substitution issue.

link|improve this answer
Thanks that was just that :) – Bastien974 Jun 15 '11 at 20:17
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.