Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

This is a parameter substitution issue.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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