All Questions
20 questions
1
vote
1
answer
107
views
Parse a selection of date formats
This Bash program parses day, month, year and month and year from arguments:
...
3
votes
1
answer
51
views
Bash argument parser with support for concatenated flags and '=' or ' ' between arguments and values
This is my best attempt so far at a bash script argument parser written without GNU getopt or bash getopts
the first two ...
5
votes
1
answer
64
views
Listing my StackEchange communities user id
Extending this answer solution, I've wrote the following bash script to get the html of my StackExchange accounts page and parse it to a YAML file. The objective ...
7
votes
1
answer
394
views
Install Python script requirements
Sometimes I download a Python script (from a trusted source), and can't run it because of missing dependencies, which I have to install one by one (no ...
3
votes
3
answers
1k
views
Shell script to parse variable definitions from Scala build file
The build.sbt text file contains versions like this:
name := "happy"
scalaVersion := "2.11.8"
sparkVersion := "2.2.0"
I wrote ...
3
votes
1
answer
138
views
Bash menu-driven text file viewer / presenter tool
This is a simple Bash script to provide menu driven manuals and standard operating procedures.
Sops and mans with the extension .sopman.txt will be loaded.
The ...
7
votes
3
answers
612
views
Bash script to extract HTML comment into a Markdown file
I learned Bash a million years ago. I just wrote this simple script used to get the first lot of HTML comments from a file, and spit it out in order to create a ...
4
votes
1
answer
102
views
Parsing Gaussian09 frequency calculations, reformatting depending on desired output
Quite similar to my earlier review this script parses a frequency calculation and reformats the found values to either fit into one row for easier importing into a spreadsheet software or a formatted ...
2
votes
2
answers
65
views
Resolve dependencies from output of PBS queueing system
I have written a script, that reformats the output of qstat -f1 of the PBS queueing system. Unfortunately this project is by far too big to post here complete, also ...
5
votes
2
answers
811
views
Parsing Gaussian 09 output for energy statement on one or more files and reformat it to a table
I am a computational chemist working with the program Gaussian 09. After I manually check the output(s) I want to create a summary for easier processing of the obtained values. Also avoid opening all ...
2
votes
1
answer
55
views
Read group of keywords from file, modify value, store new group to variable
I would like to use the following routine in my submission script for GAMESS calculations. I am not entirely sure if this is the optimum way to go.
This function would need one of the messaging ...
4
votes
1
answer
96
views
Using arrays to read in file, append it with parsed program output and overwrite original
Yesterday a friend of mine asked on U&L: How to optimize 'grep'-and-save?
I will summarise shortly. The output of the torque pbs queueing system tool qstat ...
6
votes
1
answer
3k
views
Bash function to parse git status
I have a function here and wondered how well this can be refactored.
I currently have this:
...
7
votes
1
answer
761
views
Function to get specified key from /proc/cpuinfo
On Linux, the file /proc/cpuinfo returns a set of key-value pairs, where the key and value are separated by a colon and each pair has its own line. It's a bit more ...
3
votes
2
answers
72
views
Return the first number found greater than the provided input number (13 digits)
This script converts the numbers to be at least 13 characters long (for UNIX_MS strings). For use with timestamps, I'm having issues with it being very slow. I wanted an alternative to grepping for ...