以下は、必要な機能を実装したbashスクリプトである：

```
#!/bin/bash

# Specify the extension of the files to be processed
extension=".txt"

# Loop through all files in the current directory and its subdirectories
for file in $(find . -name "*$extension")
do
  # Extract the date that the file was last modified
  date=$(date -r "$file" +%Y-%m-%d)

  # Create a directory with the name of the date, if it doesn't already exist
  if [ ! -d "$date" ]; then
    mkdir "$date"
  fi

  # Move the file into the directory named after its modification date
  mv "$file" "$date"
done
```

このスクリプトは、findコマンドを使って、カレント・ディレクトリとその サブ・ディレクトリにある、指定された拡張子（この場合は.txt）を持つ すべてのファイルを探す。dateコマンドを使って各ファイルの更新日を抽出し、mkdirコマンドを使って更新日と同じ名前のディレクトリを作成する。最後に、mvコマンドを使って、ファイルを更新日付にちなんだ名前のディレクトリに移動する。
Here is a bash script that implements the desired functionality:

#!/bin/bash

# Specify the extension of the files to be processed
extension=".txt"

# Loop through all files in the current directory and its subdirectories
for file in $(find . -name "*$extension")
do
  # Extract the date that the file was last modified
  date=$(date -r "$file" +%Y-%m-%d)

  # Create a directory with the name of the date, if it doesn't already exist
  if [ ! -d "$date" ]; then
    mkdir "$date"
  fi

  # Move the file into the directory named after its modification date
  mv "$file" "$date"
done

This script uses the find command to locate all files with the specified extension (.txt in this case) in the current directory and its subdirectories. The date command is used to extract the modification date of each file, and the mkdir command is used to create a directory with the same name as the modification date if it doesn't already exist. Finally, the mv command is used to move the file into the directory named after its modification date.