3
votes
1answer
27 views

Merging text files based on their filename

I have hundred of files with the following format: 2013_01_19_xyxyxyx.txt 2013_01_19_xyxyxyx.txt 2014_03_21_xyxyxyx.txt 2014_03_21_zxzxzxz.txt 2014_03_22_abababa.txt 2014_03_22_cbcbcbc.txt etc. I ...
0
votes
1answer
644 views

Asking ls to only list files in a path that match a specific glob/regex

In Zsh: Is there a way to use ls to only list files and folders in the current directory that match a specific globbing or regex pattern? For example, say I have multiple files that start with the ...
2
votes
4answers
3k views

How can I find all files in a folder that contain a match of a regular expression in the file name?

I'd like to find all of the files in my home folder on Linux (Ubuntu, in this case) that contain a match a particular regular expression. Is there a simple Unix command that I can use in order to do ...
2
votes
4answers
2k views

How to insert the content of a file into another file (if regexp) in shell/perl

File1 Contents: line1-file1 "1" line2-file1 "2" line3-file1 "3" line4-file1 "4" File2 Contents: line1-file2 "25" line2-file2 "24" Pointer-file2 "23" ...