All Questions
7 questions
2
votes
1
answer
26
views
Merging directories and keep files that have more lines
Goal
My goal is to merge directories. Whenever a file has the same name in two or more directories, then only the one that has the highest number of lines should be kept. If both files have the same ...
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 ...
4
votes
1
answer
442
views
Watch log dir for new file, automatically tail to slack
We have a process that outputs to log files in the format /var/log/xxx/YYYY_MM_DD.log - the file name is chosen programmatically and is not rotated using logrotate ...
4
votes
1
answer
106
views
Unlocking spreadsheet files quickly
I've created a program for my job that unlocks spreadsheet files quickly and efficiently. What we use to have to do before this program is we'd have to go into the system, search for the file, kill ...
-2
votes
1
answer
97
views
Merging files in Bash
I had this homework assignment:
Create on the desktop a folder with your name.
Copy from your account [email protected] two files, ...
5
votes
1
answer
494
views
Cleaning a WPA wordlist
I have a short bash script that processes gigs and gigs of data. I am looking for any improvements to make it faster. This is my very first bash script so please be gentle. I am really only ...
4
votes
2
answers
332
views
Script to generate templated PHP code
I've created a script to create a module in our MVC framework. The structure of the module is like this (for this example, the module is called test):
...