Reputation:
how can i 'echo' this command(NUMBER lines in my script):
Number of lines is 23.
Code:
#!/bin/bash
.
.
.
.
echo Number of line is cat $0 | wc -l
.
.
.
.
Upvotes: 3
Views: 9210
Reputation: 451
This should do the trick.
#!/bin/bash
echo "This script is `wc -l $0 | cut -d " " -f 1` lines long."
Upvotes: 5