Select file which contains sqlite in my current directory:
ls | grep sqlite
null and empty string in sqlite.txt
pythoin write None into sqlite.txt
Move them into /tmp directory:
ls |grep sqlite |xargs -i mv {} /tmp
ls /tmp | grep sqlite
null and empty string in sqlite.txt
pythoin write None into sqlite.txt
How can move them into /tmp and change the file extension as rst at the same time?
ls |grep sqlite | some_simple_bash_command
After executing it:
ls /tmp | grep sqlite
null and empty string in sqlite.rst
pythoin write None into sqlite.rst
@David C. Rankin,grep sqlite * can't work at all!

Try this Shellcheck-clean code:
*sqlite*expands to the list of files in the current directory that contain the stringsqliteanywhere in their names. See the Pattern Matching section of the Bash Reference Manual.${f%.*}expands to the value of$fwith any suffix removed. See Removing part of a string (BashFAQ/100 (How do I do string manipulation in bash?)).--argument tomvis to ensure proper handling of files whose names begin with-. See Bash Pitfalls #2 (cp $file $target).