1

simple shell scripting stdout and stdin error

view story
linux-howto

http://stackoverflow.com – I've got a problem with my shell scrip, when I ran the shell ./Test1 hello result it suppose to take hello as standard input and result as standard output. The shell should remove any whitespace, <td>, </td>, and abc So, I write the script this way tr -d [:blank:] < $1 grep -r "<td>" $1 | sed -r 's/<td>//g' > $2 sed -r 's/<\/td>//g' $2 sed -r 's/abc//g' $2 However, when I ran this command, the content of result file exactly the same as the content of hello file (the only different is the whitespace are removed) the file hello content: <td>hello& (HowTos)