#!/bin/sh for i in "2" "3" "4" "5" "6" "7" do time -p make -kpkg -j $i clean fakeroot make -kpkg -j $i --initrd --append-to-version=-custom kernel_image kernel_headers done 

    1 answer 1

    it will work, but the result will probably not be what you expect.

    but if you remove the space between make and -kpkg so that you don't get a call to the make program with the options -k -p -k -g (the latter of which is completely absent from this program, which causes it to crash, but with the option -p program just displays a list of rules and variables and ends immediately), and the call to the make-kpkg script should turn out pretty close to your expectations.

    ps to enclose the numbers in quotes in this case is not necessary.