Skip to main content

All Questions

2 votes
5 answers
434 views

AWK reading path from text file

I have a file called path_resume.txt which contains some paths to other files. Inside path_resume.txt: ./a2111oi/sky130_fd_sc_hd__a2111oi_0.txt ./a2111oi/sky130_fd_sc_hd__a2111oi_2.txt ./a2111oi/...
Mr.Seven's user avatar
1 vote
2 answers
138 views

awk script replace value with increment with if

I have a pipe delimted file d1000|1000 d1001|100 d1002|10 d1003|1 d1004| d1005| I want to modify $2 if length is less than 4 digits, and also keep empty spaces as is so trying to do it via awk script ...
Sollosa's user avatar
  • 1,983
0 votes
3 answers
229 views

ADD or SUB numbers based on op-code (directive) in the line

How can I write an awk script that can add or subtract based on what the line in the input file is asking?  I figured out how to do either only addition or subtraction, but not either/or in one script....
slowskymotion's user avatar
0 votes
3 answers
88 views

how to print the files name of a folder as file in tabulary way

i have some files in a folder and i want to print thier names in one file.txt in tabulary way like a text not one under one , is there any command for that ? dd1.txt dd2.txt dd3.txt dd5.txt
Djabri Josef's user avatar
-4 votes
3 answers
1k views

How do I calculate sum of numbers from different rows?

I have a file containing numbers in many rows and 5 columns like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... If I want to get sums of the ...
XYZ's user avatar
  • 27
-1 votes
1 answer
39 views

print the count and the line after search based on pattern

I have lines like this in multiple log files FILE 1: Line 203:Caused by :arithmatic overflow exception Line 204:at com.abc.java FILE 2: Line 105:Caused by : ???String out of bound exception Line ...
Sathish Kumar's user avatar
0 votes
1 answer
53 views

AWK script to launch a process as loop for several txt files

I have plenty of files. I need a script that iterates each file and prints columns 2 and 3 and G as first column in another file. The input files are named as UH001 UH002, UH003,...,UH123 and the ...
user396611's user avatar
1 vote
1 answer
5k views

Find row containing string, then return that row and all following rows of text file with awk

Apologies for any duplication, but most questions I've come across relate to getting a specific value from a field in a row, or using tail to get n tailing lines from a file, where n is known a priori....
jaymullr's user avatar
  • 113
0 votes
1 answer
53 views

Cutting out specific text from specific lines in real time

So I have a log running in real time and saving to a text file named 'test.txt' also in real time. Now I want to set up a process that constantly polls that text file for changes and cuts out a ...
K.R.'s user avatar
  • 1
1 vote
1 answer
193 views

How to store and line up the output of a command in an awk script?

So, I have an awk script that counts the occurences of a character minus the first field, and I want to store the output of the command in a variable all lined up. However, the following method doesn'...
user25's user avatar
  • 117
3 votes
3 answers
257 views

Text Manipulation - Transpose column into rows depending on the value

I want to write a code to be able to manipulate text on my CSV file which contains the following: 71w - Rus,51200 71w - Phi,307200 71w - Ukr,307200 71w - Ukr,51200 71w - Mic,102400 71w - Mic,51200 ...
Waltiki Sucaldino's user avatar
1 vote
1 answer
2k views

How to parse openssl certificate output into hostname and verification codes?

I have this shell code that reads lines of host names from input file, performs an openssl command to print ssl certificate info, and outputs the results in the terminal. while read x; do echo $x; ...
user9371654's user avatar
1 vote
3 answers
63 views

Extracting text from a file when I know its format

I am running a script which will output a file called scServer.scs which looks something like this: [email protected] 2 Solution 1 Fluid Flow (Fluent) Solution ...
CFD-Tester's user avatar
0 votes
3 answers
2k views

Bash: inserting output from `id` into print statement

I'm trying to achieve the following: List my Linux users, that have set bin/bash in /etc/passwd AND append each user's info from id [username] into the print statement, something in the lines of: cat ...
DavDav's user avatar
  • 517
0 votes
2 answers
102 views

Compare two files with using awk

I have 2 files. File 1 contains :- emcas_biaas_dev=-628 emcas_brs_ba=-32 emcas_cc_analytics=246 emcas_edservices_bi=312 emcas_edservices_dev=-159 emcas_engr_usd=1519 emcas_engr_xio=-67 emcas_fin_bi=...
Subhashis Dey's user avatar

15 30 50 per page