LINUX.ORG.RU

История изменений

Исправление Zmicier, (текущая версия) :

ls -1 -f ./ | xargs -n 100 file | grep -i shell

Кто ж вас так учил?

А кто у нас десятилетиями учит весь мир говнокодингу на Баше? Любимый Kroz’овский да Deathstalker’овский Мендель Купер вестимо:

| ls | xargs -p -l gzip gzips every file in current directory, one at a time, prompting before each operation.

— Advanced Bash-Scripting Guide — 2014 — С. 224

| Using wc to count how many .txt files are in current working directory:
| $ ls *.txt | wc -l

— ibid — С. 250

| ls /home/bozo | awk '{print "rm -rf " $1}'

— ibid — С. 276

| exe_file=$( ls -l /proc/$1 | grep "exe" | awk '{ print $11 }' )

— ibid — С. 466

| if ls -l nonexistent_filename 2>&1 | grep -q 'No such file or directory'

— ibid — С. 538

Исходная версия Zmicier, :

ls -1 -f ./ | xargs -n 100 file | grep -i shell

Кто ж вас так учил?

А кто у нас десятилетиями учит весь мир говнокодингу на Баше? Kroz’овский да Deathstalker’овский Мендель Купер вестимо:

| ls | xargs -p -l gzip gzips every file in current directory, one at a time, prompting before each operation.

— Advanced Bash-Scripting Guide — 2014 — С. 224

| Using wc to count how many .txt files are in current working directory:
| $ ls *.txt | wc -l

— ibid — С. 250

| ls /home/bozo | awk '{print "rm -rf " $1}'

— ibid — С. 276

| exe_file=$( ls -l /proc/$1 | grep "exe" | awk '{ print $11 }' )

— ibid — С. 466

| if ls -l nonexistent_filename 2>&1 | grep -q 'No such file or directory'

— ibid — С. 538