Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Remi.b's user avatar
  • 617
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 ...
Martin - マーチン's user avatar
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 ...
Jay Paroline's user avatar
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 ...
13aal's user avatar
  • 872
-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, ...
user86685's user avatar
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 ...
Dylan's user avatar
  • 153
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): ...
TMH's user avatar
  • 499