All Questions

Tagged with
Filter by
Sorted by
Tagged with
3
votes
2answers
84 views

Add extension to all files within a directory that contain exact string

I have a large directory with multiple levels and tons of files. A majority (but not all) of these files are HTML files, but do not have the .html extension (a problem when copying over to Windows). ...
3
votes
3answers
1k views

Print out list of files less than specified file size

I'm trying to create a script that can be executed to search a list of files, compare the file size field to the specified file size, and then display the files that are less than the specified file ...
0
votes
0answers
70 views

A letter is missed in Russian words to be searched in VIM

When I run: $ vim -s <(printf '/конфедерация') VIM opens and shows '/конфедерция' in the left bottom corner without 'а'. Why? There is no problem with '/стол' for example. But if the word is a ...
0
votes
0answers
73 views

Script to search lines from a .csv or .pdf on Google [closed]

I have a file with a long list of names, but without their e-mail addresses. Because the list is very long, I would like to build a script that takes each line from the file (it can be PDF or CSV) and ...
0
votes
1answer
66 views

Unix scripting : Writing to another file with “:” is failing

I have below record (and many other such records) in one file 9460 xyz abc (lmn):1027739543798. Taxpayer's identification number (INN): 123. For all IIB. 2016/02/03 I need to search ...
1
vote
2answers
107 views

How do I find a substring in a command line?

I have a few files that contains a similar entry like as follows: {"result":[]} {"result":[{"alternative":[{"transcript":"I win","confidence":0.87958056},{"transcript":"when"},{"transcript":"Schwinn"}...
3
votes
1answer
1k views

Regular Expression to match (not x) and y (!x & y)

I received a desktop day-to-day calendar with puzzles. One such puzzle was deciphering a quote where the letters were substituted with symbols. I used some RegExs to find longer words, then used the ...
0
votes
1answer
260 views

How can I replace a filename with .ear in a file-list using sed?

I have a file whose contents look like: /appl/as/var/spool/ears/mps/ear1.ear ... I want to replace the name of only ear1.ear with ear2.ear and I am using the below sed command, but with no luck: ...
-1
votes
2answers
692 views

Extracting certain data within a script output file

We have a script that runs several commands and rolls up all the output and inserts in into a log file. One of the commands it runs is "netstat -anp". I'd like to be able to search this file for all ...
0
votes
2answers
148 views

How to count number of instance of a word starting at another word

I need to grep the MySQL-error log starting at today's date formatted like: `date +"%y%m%d"` (140710) And look for all instances of the word partitioned. I've tried various things to no avail. ...
3
votes
3answers
2k views

Help searching in files for regex patterns, recursively, with specialized output

My problem is that I need to: Find all lines matching regex_pattern in all files (deep search) in a given root directory For each line that matches, output: File name Line number containing the ...