[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] OT: Help with _funky_ characters in bash script
- Subject: [ale] OT: Help with _funky_ characters in bash script
- From: fletch at phydeaux.org (Fletch)
- Date: 09 Jul 2003 10:42:12 -0400
>>>>> "Jeff" == Jeff Layton <jeffrey.b.layton at lmco.com> writes:
[...]
Jeff> WORKSIZE=`ls -lsa ${WORKDIR}/${CASEPROJ}.urest | awk '{print
Jeff> $1}' `
Jeff> to a file (I hope these characters some through correctly :)
Jeff> Does anybody have a way to echo all of this line, including
Jeff> the _funky_ characters, to a file?
Aside from the obvious . . .
#!/usr/bin/perl
open( OUT, ">" . shift() ) or die "can't open output: $!\n";
print OUT <<'EOT';
WORKSIZE=`ls -lsa ${WORKDIR}/${CASEPROJ}.urest | awk '{print $1}'`
EOT
close( OUT );
exit 0;
__END__
You could just quote them . . .
echo 'WORKSIZE=`ls -lsa ${WORKDIR}/${CASEPROJ}.urest | awk '"'"{print \$1}"'"'`' > fooble
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
770 294-0820 (m) | scary questions." -- Jules =(___)=
| U
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale