Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Try ${ cdr_type}, ${DAYZ}, ${14} and ${22} instead of $cdr_type, $DAYZ, $14 and $22. Commented Oct 4, 2016 at 15:48
  • 1
    How do you echo it? $14 as expanded by the shell would be the same as ${1}4 and if $1 is empty, that would give 4 as expected. In there, it looks like there are some $s that you want to pass untouched to awk and some for which you want shell variables to be expanded. Commented Oct 4, 2016 at 15:49
  • echo "find . -name $cdr_type*$DAYZ*.unl* | xargs zcat | awk -F | '{if($14==$tdate && $22==$misdn) print $0}'|head" Commented Oct 4, 2016 at 16:03