Skip to content

Commit cb08903

Browse files
committed
fixing the sort bug
1 parent b640def commit cb08903

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • implement-shell-tools/cat

implement-shell-tools/cat/cat.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { glob } from "glob";
33
async function readFile(){
44
const fileNamePattern=process.argv[2];
55
const filesNameArray=await glob(fileNamePattern);
6+
filesNameArray.sort();
67
for(const file of filesNameArray){
78
const fileContent=await fs.readFile(file,"utf-8");
89
console.log(fileContent);

0 commit comments

Comments
 (0)