I am trying to get a substring from a string stored in a variable. I tried sed with a bit help from this forum, but not successful. Here is my problem.
My string is: "REPLYFILE=myfile.txt"
And I need: myfile.txt (everything after the = symbol).
My string is: "myfile.txt.gz.20091120.enc
And I need: myfile.txt.gz (everything before string .gz, including .gz).
After my sed failed, I tried to get the position of the delimiting string thinking of using cut command. But failed at that as well.
As I am trying to learn sed and awk, any links to good tutorial is appreciated.
Thanks