Guest_imported
New member
- Jan 1, 1970
- 0
I am having some problem with my script, hopefully someone can help. When I ran the script in bourne shell in Redhat then everything works fine. But when I ran in bourne shell in Solaris7 or AIX4.3 or HPUX 11.x, the output from my second and third sed command are empty file.
---sed part of script---
case "$OPTION_IN" in
.
.
.
f|F) sed -e 's/^/'"$Z"'/' file1 | tr -s "\n" " " > out1;
sed -e 's/^/'"$Z1"'/' out1 > out2;
sed -e 's/$/'"$Z2"'/' out2 > out3;
;;
q|Q) break ;;
*) echo "Invalid choice." ;;
esac
do
exit
----------------------
where Z1="some_text_string"
Z2=filename
Any help is appreciate.
Thank you
---sed part of script---
case "$OPTION_IN" in
.
.
.
f|F) sed -e 's/^/'"$Z"'/' file1 | tr -s "\n" " " > out1;
sed -e 's/^/'"$Z1"'/' out1 > out2;
sed -e 's/$/'"$Z2"'/' out2 > out3;
;;
q|Q) break ;;
*) echo "Invalid choice." ;;
esac
do
exit
----------------------
where Z1="some_text_string"
Z2=filename
Any help is appreciate.
Thank you