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 脚本中指定的某些函数。有点像map()在 JavaScript 中调用对象,但在本例中使用 bash。
map()
你只需要遍历文件。假设您的密码是该文件夹:
for file in *.txt; do do your stuff here with "$file" ... done