05-31-2016
I'm giving up.
On top of what Don Cragun said,
- the attached files' names don't match the ones mentioned in the text
- the attached files are no *nix text files as they are lacking the trailing <new line> char
- the attached files' structure (case, spaces around "=", maybe more) doesn't match the one mentioned in the text or inferred from the code sample.
Why don't you take a step back, rephrase the specification and explain the logics needed using input sample data and showing how they should show up in the output?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello friends,
I have find a paticular string from the files present in my user
for example:
a username and password is hardcoded in multiple files which present in the my user.so I have to search about username in which files it is available.there are several dirctories are there,so... (5 Replies)
Discussion started by: sivaranga001
5 Replies
2. Shell Programming and Scripting
Hi,
I have a file with about 50k keywords. I have a requirement to scan about 3k files to identify which filename has which keyword i.e. an output like following:
File1,Keyword1
File1,Keyword2
File3,Keyword1
.....
I have written a shell script which takes each of the 3k files, searches... (4 Replies)
Discussion started by: rjains
4 Replies
3. Shell Programming and Scripting
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies
4. UNIX for Dummies Questions & Answers
Hi to all
Sorry for the confusion because I did not explain the task clearly.
There are many .hhr files in a folder
There are so many lines in these .hhr files but I want only the following 2 lines to be transferred to the output file.
The keyword No 1 and all the words in the next line
They... (5 Replies)
Discussion started by: raghulrajan
5 Replies
5. UNIX for Advanced & Expert Users
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way... (10 Replies)
Discussion started by: virtual123
10 Replies
6. Shell Programming and Scripting
Task: Find keywords in each line, and append at the end of line; if not found in the line, do nothing.
the code is wrong. how to make it work. thanks a lot.
cat keywords.txt | while read line; do
awk -F"|" '{if (/$line/) {print $0"$line , ";} else print;}' outfile.txt > tmp
... (9 Replies)
Discussion started by: dtdt
9 Replies
7. Shell Programming and Scripting
I have ~100 text files in a directory that I am trying to parse and output to a new file. I am looking for the words chr,start,stop,ref,alt in each of the files. Those fields should appear somewhere in those files. The first two fields of each new set of rows is also printed. Since this is on a... (7 Replies)
Discussion started by: cmccabe
7 Replies
8. UNIX for Dummies Questions & Answers
The Problem that I am having is when the code ran and populated the progflag.csv file, columns MEMSIZE, SECOND and SASEXE were blank. The next problems are the IF else statement isn't working and the email function isn't sending the progflag.csv attachment.
a. What I want the program to do is to... (2 Replies)
Discussion started by: dellanicholson
2 Replies
9. Shell Programming and Scripting
I have a script that will search for a keyword in all the log files. It work just fine.
LOG_FILES={ "/Sandbox/logs/*" }
for file in ${LOG_FILES}; do
grep $1 $file
done
This only works for 1 keyword. What if I want to search for more then 1 keywords, say 4 or maybe even... (10 Replies)
Discussion started by: Loc
10 Replies
10. UNIX for Beginners Questions & Answers
Hello everybody, I need your help.
I have a php site that was expoited, the hacker has injected into many php files a phishing code that was discovered and removed in order to have again a clean code. Now we need to remove from many php files that malware. I need to create a script that find and... (2 Replies)
Discussion started by: ninocap
2 Replies
LEARN ABOUT CENTOS
lookbib
LOOKBIB(1) General Commands Manual LOOKBIB(1)
NAME
lookbib - search bibliographic databases
SYNOPSIS
lookbib [ -v ] [ -istring ] [ -tn ] filename...
DESCRIPTION
lookbib prints a prompt on the standard error (unless the standard input is not a terminal), reads from the standard input a line contain-
ing a set of keywords, searches the bibliographic databases filename... for references containing those keywords, prints any references
found on the standard output, and repeats this process until the end of input. For each database filename to be searched, if an index
filename.i created by indxbib(1) exists, then it will be searched instead; each index can cover multiple databases.
OPTIONS
It is possible to have whitespace between a command line option and its parameter.
-v Print the version number.
-istring
When searching files for which no index exists, ignore the contents of fields whose names are in string.
-tn Only require the first n characters of keys to be given. Initially n is 6.
FILES
filename.i Index files.
SEE ALSO
refer(1), lkbib(1), indxbib(1)
Groff Version 1.22.2 7 February 2013 LOOKBIB(1)