10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm interested in writing a report script using BASH that searches all of the files in a particular directory for a keyword and printing a list of files containing this string...
In fact this reporting script would have searches for multiple keywords, so I'm interested in making multiple... (2 Replies)
Discussion started by: chemscripter904
2 Replies
2. Shell Programming and Scripting
So, I have a directory tree that has many files named thusly:
X_REVY.PDF
I need to find any files that have the same X portion (which can be nearly anything) as any another file (in any directory) but have different Y portions (which can be any number from 1-99).
I then need it to return... (3 Replies)
Discussion started by: Kamezero
3 Replies
3. Shell Programming and Scripting
I am running a UNIX script to get unused files and their sizes from the server. The issue is arising due to the spaces present in the filename/folder names.Due to this the du -k command doesn't work properly.But I need to calculate the size of all files including the ones which have spaces in them.... (4 Replies)
Discussion started by: INNSAV1
4 Replies
4. UNIX for Dummies Questions & Answers
Dear Gurus,
I have 57 tab-delimited different text files, each one containing entries in 3 columns. The first column in each file contains names of objects. Some names are present in more than one file. I would like to find those names and store them in a separate text file, preferably with a... (6 Replies)
Discussion started by: Unilearn
6 Replies
5. Shell Programming and Scripting
I have 1000's of directories which is named as numbers. Each directory contains multiple files. Each of these directories have a file named "att". I need to rename all the att files by adding the directory name followed by "_" then att for each of the directories.
Directories
120
att... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
6. Shell Programming and Scripting
I am trying to search for 2 files using the find command as below
find -name file1.txt -a -name file2.txt
It doesn't give a result although the files exist in the folder, however when i try the following
find -name file1.txt -o -name file2.txt
It does give me the result.
./file2.txt... (4 Replies)
Discussion started by: vivek_damodaran
4 Replies
7. UNIX for Dummies Questions & Answers
I have several files (around 50) that have the similar format. I need to extract the 5th line from every file and output that into a text file. So far, I have been able to figure out how to do it for a single file:
$ awk 'NR==5' text1.txt > results.txt
OR
$ sed -n '5p' text1.txt > results.txt... (6 Replies)
Discussion started by: oriqin
6 Replies
8. Shell Programming and Scripting
Hello folks,
I have a text file aa.txt that contains below text
(\')|(\-\-)
((\%3D)|(=))
20%0d%
i want to search each line pattern in /opt/1.log and /opt/2.log. Can some one suggest (1 Reply)
Discussion started by: learnbash
1 Replies
9. UNIX for Dummies Questions & Answers
What's the best way to see if a common name exists in two separate files? (3 Replies)
Discussion started by: Rally_Point
3 Replies
10. Shell Programming and Scripting
I am trying to find all files in a directory whose name has a real number larger then the number I am looking for.
For example:
.
|-- delta.1.5.sql
|-- delta.2.1.sql
|-- delta.2.2.sql
|-- delta.2.3.sql
|-- delta.2.4.sql
`-- delta.2.5.sql
I know my database is at 2.2 so I want an... (2 Replies)
Discussion started by: harmonwood
2 Replies