I am trying to use the cut command in my bash script. I need to get the name of a rpm package containing 'sys' in its name, without its full path. So I tried this:
packageName=$(find temp/noarch/ -name '*sys*noarch.rpm' | cut -d "\/" -f 3)
I thought this way could return the package's name without the temp/noarch/, but it only tells me.
I know i could just remove the substring "temp\/noarch\/"
, but i'd like to make it with cut.