Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は bash で小さなコードに取り組んでいますが、小さな問題で立ち往生しています。文字列があり、その文字列の最後の文字をs.
s
例: で終わるすべてのファイルを取得しc、最後cをs.
c
for file in *.c; do # replace c with s echo $file
誰か助けてくれませんか?
renameループを回避したい場合は、ユーティリティを使用してください
rename
rename -f 's/\.c$/.s/' *.c