Reputation: 757
I'm trying to clean the file from its remarks (#example) and transfering the output to function named func, but it doesnt work. what am I doing wrong? it says something is wrong in line 3. "func command not found"
#!/bin/bash
cut -d"#" -f1 $1 | func
function func {
while read line; do
echo $line
done
}
thanks
Upvotes: 1
Views: 42
Reputation: 1824
you have to have the func
definition before you can use it.
Upvotes: 4