[Solved] grep question: altering what it picks up on [closed]
Here’s what I did to solve this problem: grep ‘ Skillz ‘ * This returned the desired output: Skillz [email protected] solved grep question: altering what it picks up on [closed]
Here’s what I did to solve this problem: grep ‘ Skillz ‘ * This returned the desired output: Skillz [email protected] solved grep question: altering what it picks up on [closed]
Since you didn’t provide any details, here is the boiler plate. $ sed -n ‘/start/,/end/p’ file > outputfile or $ awk ‘/start/,/end/’ file > outputfile 3 solved Script to grep on range of start/end text [closed]
Since it’s not clear what you’re trying to do: If you expect the following output: yypasswd then do ps -ef | grep yypasswd | awk ‘{print $8}’ if you want the following output: testacc 25124194 2512312620 0 08:00:53 pts/0 0:00 then do ps -ef | grep yypasswd | awk ‘{print $1, $2, $3, $4, $5, … Read more
Assumptions: we want to match on lines that start with the string number we will always find 2 matches for ^number from the input file not interested in storing values in an array Sample data: $ cat file.dat number1: 123 not a number: abc number: 456 We’ll use awk to find the desired values and … Read more