I have some zip files in directory when I need to unzip each in specific dir I usedls | awk '{ print unzip  $1  -d  $1} 'unzip p21286665_121020_Linux-x86-64.zip -d p21286665_121020_Linux-x86-64.zipunzip p21841318_121020_Linux-x86-64.zip -d p21841318_121020_Linux-x86-64.zipunzip p22098146_121020_Linux-x86-64.zip -d p22098146_121020_Linux-x86-64.zipBut I need something like this.unzip p21286665_121020_Linux-x86-64.zip -d p21286665unzip p21841318_121020_Linux-x86-64.zip -d p21841318unzip p22098146_121020_Linux-x86-64.zip -d p22098146
using awk to unzip files in directory
sed;awk;grep
You could also use the -F argument to split the line on underscore and thus end up with something like this:ls | awk -F_ '{print unzip  $0  -d  $1; }