Questions tagged as 'awk'

2
answers

Concatenate rows in Linux file

I need to generate a linux script that concatenates information. I have a file (arch1.txt) that contains first and last names: Juan Perez Ana Lopez and I have another script that, when executed, returns a line that contains the age of the p...
asked by 17.03.2017 / 05:48
4
answers

Delete text after ==

A requirements file pip contains all the packages installed in Python, so that the file can be used elsewhere and rebuild the original programming environment. A requirements file looks like this: alabaster==0.7.9 arrow==0.8.0 awesome-slu...
asked by 10.03.2017 / 20:26
1
answer

How to get the characters of a record composed of several columns with awk? [closed]

I have a file with more than 1000 records which come from this way: AAAA 100141167 100141167 100141167 60000000069615260000000026093000000000495700000000310500000000031050B/V ESAC 00100 100021110...
asked by 04.07.2018 / 21:16
1
answer

In AWK how to do output of 18 lines [closed]

I have to do an output of 18 lines: ls -lh ~cis140u/lab6examples |awk '{print" \t",$8, $6,-$7,"\t",$NF , $5, "\t",$10; } ' in order of DATE ARCHIVE SIZE Is it okay?     
asked by 06.08.2017 / 17:03
0
answers

Extract data from a file with a column

I have a file file.txt , as follows: 24/9/2018 15:35:19,380 B63201C 9/24/2018 15:35:22,350 ES0101C (initial_time) 9/24/2018 15: 36: 13.231 Execute next service: 0003 9/24/2018 15: 38: 13,664 Result of the execution of 0003 Result: 0...
asked by 03.10.2018 / 15:17
1
answer

How can I select the lines between two patterns?

   Question and answer based on my own question and answer in How to select lines between two patterns? I have a file like the following and I would like to print the lines that appear between the patterns PAT1 and PAT2 . 1...
asked by 14.03.2017 / 16:16
2
answers

How can I remove the line break in a column using Awk?

I have something like this: Arena Gig1/46 Gig1/0/49 CUCMS4 Gig7/35 eth0 SALUD-3750-P1R4v-dis Gig1/7 Gig1/0/12 CUCMS5 Gig7/33 eth0 EMMA_6 Gig1/36 Gig1/0/49...
asked by 07.03.2018 / 00:37