Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged awk

0 votes
706 views
1 answer
    I'm trying to get the values in column X at lines 5 to 5 + Y. I'm guessing there's a quick way to do this with awk. How is this done? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
632 views
1 answer
    I can find all non-matched lines of file with grep -v 'my_pattern' some_file. Also i can print few strings ... more elegant way to do this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
424 views
1 answer
    awk newbie here.. I'm trying this: top -b -p 30259 | awk 'BEGIN { OFS = ","; print "Timestamp,CPU, ... working fine. What am I doing wrong? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
682 views
1 answer
    Would like to read the first column then Fill downward Empty Column value with Previous Non-Empty Column value. ... CHARGE Any suggestions ...! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
582 views
1 answer
    Need help in scanning text files and find all the words between two patterns. Like say if we have a . ... any examples is greatly appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
582 views
1 answer
    Is there any better methods to print two or more columns into one column, for example input.file AAA 111 ... suggestions? Thank you very much! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
447 views
1 answer
    I want gawk to parse number using comma , as the decimal point character. So I set LC_NUMERIC to ... point without specifying POSIX option? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
711 views
1 answer
    I have a file like this 1 4 7 ... 2 5 8 3 6 9 And I would like to have as output 6 15 24 ... ... can't do it automatically for all the columns. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
647 views
1 answer
    I am trying to collapse sequential numbers to ranges in bash. For example, if my input file is 1 2 3 4 15 ... line command? Thanks for any help! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
566 views
1 answer
    Looking to convert human readable timestamps to epoch/Unix time within a CSV file using GAWK in preparation for ... awk in another command? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
426 views
1 answer
    Is there a way to plot a function based on values from a text file? I know how to define a function in ... online, do you have any suggestions? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
548 views
1 answer
    How to easily print line above the match and skip the match itself? grep -A, -B and -o opt do not ... This should ideally return bar baz foo See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
475 views
1 answer
    I have two text files. One contain just one column of words. Hundreds of words. Just one word in every line. ... : TGD car 2424: jdj notebook See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
531 views
1 answer
    How can I add a new column to a file with awk codes? original.file F1 F2 F3 ..F10 add F11 to original.file F1 F2 F3 ..F10 F11 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
538 views
1 answer
    Why does echo foo bar..baz bork | awk 'BEGIN{RS=".."} {gsub(OFS,"");}1' seem to do the ... anywhere, although I could have missed something. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
491 views
1 answer
    My dummy file looks like this: C1 C2 C3 1 a snow 2 b snowman snow c sowman I want to get line if ... But there should be more simpler way. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
419 views
1 answer
    I have 100 text files containing single columns each. The files are like: file1.txt 10032 19873 18326 file2.txt 10032 ... only once in 1 file. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
590 views
1 answer
    The awk manual indicates that both -v FS and -F are equivalent ways to set the field separator. The GNU Awk ... to empty is a gawk specific? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
674 views
1 answer
    I have two files: input.txt: Hi 1-12T2EDD 1-13D62L6Hello 1-15SDWAKWazzup Wow1-18Z3QWY filter.txt: 1- ... -12T2EDD 1-13D62L6Hello Wow1-18Z3QWY See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
658 views
1 answer
    The following works great on my data in column 12 but I have over 70 columns that are not all the same and I need to ... ,2,1,1,1,1,4854347,0,- See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
585 views
1 answer
    I would like to remove comma , at the end of each line in my file. How can I do it other ... MP_IMS_ID_ACTN_CD BYTEINT NOT NULL, NPI_ID BIGINT, See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
581 views
1 answer
    I have a file that is constantly being written to/updated. I want to find the last line containing a particular word ... there a way to do this? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
684 views
1 answer
    I need to remove all the blank lines from an input file and write into an output file. Here is my data as ... ,5,1,1,18-JAN-13,000781615746 See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
678 views
1 answer
    I have a function which outputs many rows of information which I want to format in columns. The problem is that ... need to use something else? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
509 views
1 answer
    grep -A1 'blah' logfile Thanks to this command for every line that has 'blah' in it, I get the output of ... only show next line in the output. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
624 views
1 answer
    Would like to print unique lines based on first field , keep the first occurrence of that line and remove ... for your suggestions ... See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...