Determine com.apple.Finder AppleShowAllFiles status using command line?
Thank you for comment from @Yoric

I found the answer from stackoverflow @Carter Allen

#!/bin/bash
#toggle AppleShowAllFiles

current_value=$(defaults read com.apple.finder AppleShowAllFiles)
if [ "$current_value" = TRUE ]
then
  defaults write com.apple.finder AppleShowAllFiles FALSE
else
  defaults write com.apple.finder AppleShowAllFiles TRUE
fi

killall Finder