Regular expression – AWK for separating words by underscore

I use awk very badly, but I know it is very useful for contingency operations.

I have a form file:

JohnSmith_name 3.4 
KellySears_name 5.7
RonaldBay_name 1.2
RayShendor_name 2.8

I want to read the file and basically delete it from the real name_ name the label and print the line. How can I do this with awk?

Thank you!

In this case, you can use sed more easily than awk, I think:

$sed s/_name// file
JohnSmith 3.4
KellySears 5.7
RonaldBay 1.2
RayShendor 2.8

I use awk very badly, but I know it is very useful for strain manipulation.

I have a table file:

JohnSmith_name 3.4 
KellySears_name 5.7
RonaldBay_name 1.2
RayShendor_name 2.8

I want to read the file and basically delete it from the real name _name label and print the line. How can I do this with awk?

Thank you!

In this case, you can use sed more easily than awk, I think:

$sed s/_name// file
JohnSmith 3.4
KellySears 5.7
RonaldBay 1.2
RayShendor 2.8

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5455 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.