Skip to main content

All Questions

Tagged with
0 votes
1 answer
56 views

Powershell Cannot find drive. A drive with the name ' C' does not exist

Wrote a PS script that reads a .ini file for certain parameters to copy files from folder_a to folder_b,c ..and so on. I get the dreaded " Cannot find drive. A drive with the name ' C' does not ...
NanoNet's user avatar
  • 258
-2 votes
0 answers
42 views

How to parse Nginx config files via Shell tools?

Are there Bash scripts allow to parse Nginx config files? e.g script to get all includes directives from config file. I've seen software allows to transform .conf to .json but it uses no-shell tools.
palmasd1's user avatar
-1 votes
2 answers
58 views

Can a bash script extract name, version number and extension from a list of filenames

I am having trouble creating a Bash script that will extract application name, version number and possible extension from a list of filenames such as: name-of-application-1-v1.2.3.AppImage app-name2-...
Simon Bagley's user avatar
1 vote
0 answers
75 views

Context Free Grammar clarification

I created the following grammar for a minishell, but i realized that the parser never goes to command_p, it only stays at cmd_prefix. Can somebody please clarify for me since i've seen a similar ...
MannBell's user avatar
0 votes
1 answer
40 views

Reading line-by-line in two files simultaneously in Bash Script [duplicate]

I have 2 files named as file1.csv and file2.csv. Contents are as follows : file1.csv: a b c d and file2.csv: 1 2 3 4 How can I write a shell (bash) script to print as below : Expected Outcome : a ...
Pisers's user avatar
  • 99
0 votes
1 answer
252 views

How to parse arguments shell-check compliant, using a contained function, instead of script?

Context I'm trying to write a decent bash parser using separate files and functions for: argument parsing (e.g. determining what to do) parsed argument processing (e.g. doing those things) printing ...
a.t.'s user avatar
  • 2,574
0 votes
2 answers
44 views

What is the best way to parse filenames? [duplicate]

I was originally writing a command to periodically remove auto-generated Emacs files at a certain interval, starting at my current directory (before becoming aware you can disable this within Emacs): #...
user9329423's user avatar
0 votes
3 answers
160 views

How can I read keys from the key-pair values defined in a YAML using Python Niet?

I have a YAML file and I'm using Python niet as a YAML parser to read the file. The YAML file looks like this - configuration: warehouse: warehouse-name database: database-name object_type: ...
Chuck's user avatar
  • 39
0 votes
0 answers
268 views

POSIX Shell Implementation in C

I am currently working on a POSIX shell implementation in C that should work as described by SCL. For now I have created the following lexer: struct lexer { char cur_char; long cur_pos; ...
Nicolas's user avatar
  • 33
1 vote
2 answers
627 views

Iterate through chunks of a (somewhat structured) file in bash

I have a file containing the following "structured" text : >some multiline- >text --- >in multiple chunks (this one for instance is the second of this sample) --- >Their number, ...
Ar3s's user avatar
  • 2,277
-1 votes
1 answer
182 views

Get markdown heading level in awk

Given a string with a markdown heading, what would be the best way to return the level of the heading in awk? Assumptions: For this scenario, to be considered a heading the only requisite is that the ...
João Pesce's user avatar
  • 2,464
0 votes
1 answer
733 views

How to parse particular line of text from Jenkins Console output into a csv file

I have the several of following lines in Jenkins console output. I wanted to store them in a csv file in 2 columns. Follwoing is the text line: NumberOfTestCases in https://****:****@bess-bitbucket....
Manoj Kumar's user avatar
0 votes
0 answers
129 views

How to parse through nested column in text file in a shell script

I have a text file that has the following format: group A: red team: worker 1, worker 2 green team: worker 2, worker 3 Group B: Team_Blue:worker 4, worker 2 Team_Black: worker 5, worker 6 Team_Grey: ...
Zizi96's user avatar
  • 499
0 votes
1 answer
147 views

Parse digits in Makefile

I want to parse digits of a version in a Makefile. I am getting the version in a variable, that variable reads VER=10.11.12-0.1.2 Now I want each individual digits in different variables let's say A=...
SD.'s user avatar
  • 1,470
1 vote
2 answers
1k views

How do I parse data from a JSON file and save it to another text file in shell script

Suppose I have this JSON file, { "tags": [ { "name": "xxx1", "image_id": "yyy1" }, { "name": "xxx2&...
butterfingers's user avatar

15 30 50 per page
1
2 3 4 5
22