I would want to make a one liner (sed) that is able to extract a field form a log file bounded by two strings, however I wouldn't want to delete those lines that doesn't have this field but have an newline ( or a string, if possible) instead.This would be particularly important since I would want to use paste command to generate a csv file from several files, each containing the value of the field.

I guess this is not a very common use-case for sed, my gut feeling says branching is the solution but I haven't found any reasonable track to follow yet.Does anybody have a clue?Thank you very much in advance,

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum