Awk command add value/symbol beginning or end of line

Add any value or symbol beginning of the line

awk '{print $9}' | awk '{print "-"$0}'  file_name


Add any value or symbol end of the line
awk '{print $9}' | awk '{print $0"-"}'  file_name


Add any value beginning and end of line
awk '{print $9}' | awk '{print "-"$0"-"}' file_name

Share on Google Plus

About Md. Shahzad Alam

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment