0

I have string as WEB-INF/lib/abc.jar This has to be removed via usage of sed command and output has to be abc.jar

Input : WEB-INF/lib/abc.jar

Output: abc.jar

I am trying the command separately as

sed 's/WEB-INF//g' | sed 's/lib//g'

However this has to be done in one shot not to be used in different commands .

Please suggest

Scientist
  • 1,458
  • 2
  • 15
  • 31

1 Answers1

0

Using sed

$ sed 's~[^.]*/~~' input_file
abc.jar
HatLess
  • 10,622
  • 5
  • 14
  • 32