Home >
OS > For help, to write a shell script, modify the file suffix, under the specified path to the user to s
For help, to write a shell script, modify the file suffix, under the specified path to the user to s
Write a shell script, modify the file suffix, under the specified path to the user to specify all the suffix is called path. TXT file rename. Pub
CodePudding user response:
#!/bin/bash
The read - p "both please input the dir" dir
CD $DIR
Rename. TXT. Pub *. TXT
CodePudding user response:
Move to the corresponding directory. Write a shell script to add the following command
#!/bin/bash
For I ` in ls *. TXT `
Do
Mv $I ${I %. *}. The pub;
The done