sed? insanity
This is driving me batty. Can anyone tell me what's broken here?
% ./shtest weird
t: s,$,weird,
s: TESTweird
% make -f maketest test
t: make[1]: Entering directory `/tmp'
s,$,weird,
make[1]: Leaving directory `/tmp'
sed: -e expression #1, char 1: Unknown command: ``m''
s:
-----8<-----
#!/bin/sh
# shtest
weird="s,\$\$,$1,"
t=`make -f - <<EOF
all:
@echo $weird
EOF`
echo "t: $t"
s=`echo TEST | sed -e "$t"`
echo "s: $s"
-----8<-----
#!/usr/bin/make
# maketest
test:
@./shtest 'weird'
-----8<-----
Reply to: