Want to run the awk command inside backtik operator in perl. It’s giving me a error. I tried escaping the quotes , pipe but nothing seems to work.
my @fieldCnt=`head -1 $inputFileDir/$cmdParams{mas}|awk -F, \'print NF\'`;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would just do it within the perl script rather then using awk. If I understand what you are trying to achieve, you are looking for the number of items in the line separated by a comma, then
Hopefully this is helpful.