Skip to content

Commit 4aceacf

Browse files
committed
implementing -b flag
1 parent dfc9d45 commit 4aceacf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • implement-shell-tools/cat

implement-shell-tools/cat/cat.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ import { glob } from "glob";
2828
}
2929
//console.log(linesOfText);
3030
for(const line of linesOfText){
31+
if (line.trim()==="" && flag==='-b'){
32+
console.log(line);
33+
}else {
3134
console.log(`${lineNumber} ${line}`);
3235
lineNumber ++ ;
36+
}
3337
}
3438
}
3539

0 commit comments

Comments
 (0)