10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
2. Shell Programming and Scripting
I have a file that I'm trying to place into a variable.
I've tried the following:
DATE=`date +%Y%m%d`
filez=$(cat /tmp/Test_$DATE.txt)DATE=`date +%Y%m%d`
filez=$(</tmp/Test_$DATE.txt)DATE=`date +%Y%m%d`
filez=$(`cat /tmp/Test_$DATE.txt`)None of these lines allows the file to go into the... (3 Replies)
Discussion started by: newbie2010
3 Replies
3. Solaris
Hello,
I have spent considerable amount of time breaking my head on this and reached out here. here is the back ground.
OS - Solaris 10
There are two strings '<Orin>sop' and '<Dup>two' which I wanted to look for in a file without the quotes on different lines and ONLY if both strings are... (5 Replies)
Discussion started by: keithTait309875
5 Replies
4. Shell Programming and Scripting
Greetings.
I have a file with information like this:
AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?
AMNDHRKEEU?AMNDHREOEU?
AMNDHREU?AHRKEOEU?AMNDHRKEU?AMNDKEOEU?
What I need to extract is the position, in every line, of every occurrence of '?'
A desired output would be something... (6 Replies)
Discussion started by: Twinklefingers
6 Replies
5. Shell Programming and Scripting
I have a file with
<suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux">
Need to find word "build" then
extract build number, which is 19921 also
release number, which is 6.1.5 then
concatenate them to one variable as... (6 Replies)
Discussion started by: garg
6 Replies
6. UNIX for Dummies Questions & Answers
Hi all
I am working on disallowing users to use easy passwords in pam.d setting on RHEL 5.7 and SuSe 11, and I was hoping to add more words into the current cracklib dict, so I use "echo" command to append new words into the file
I dont want to add the same words into the dict, I think I... (2 Replies)
Discussion started by: hedkandi
2 Replies
7. UNIX for Advanced & Expert Users
Hi There...
I need to serach and replace strngs in a text file.
My file has;
books.amazon='Let me read'
news.bestseller='xyz'
expected output is
books.amazon=NONFOUND
news.bestseller=NONFOUND
Can I first find the text between string1= books.amazon=' and string2= ' (locate the text... (1 Reply)
Discussion started by: Hiano
1 Replies
8. Shell Programming and Scripting
Hi Forum.
I was trying to search the following scenario on the forum but was not able to.
Let's say that I have a very large file that has some bad data in it (for ex: 0.0015 in the 12th column) and I would like to find the line number and remove that particular line.
What's the easiest... (3 Replies)
Discussion started by: pchang
3 Replies
9. UNIX for Advanced & Expert Users
Hi ,
I have a text file in the format
DB2:
DB2:
WB:
WB:
WB:
WB:
and a second text file of the format
Time=00:00:00.473
Time=00:00:00.436
Time=00:00:00.016
Time=00:00:00.027
Time=00:00:00.471
Time=00:00:00.436
the last string in both the text files is of the... (4 Replies)
Discussion started by: kanthrajgowda
4 Replies
10. Linux
I need to find the line count of multiple strings in a particular file. The strings are as follows:
bmgcc
bmgccftp
bsmsftp
bulkftp
cctuneftp
crbtftp
crmpos
cso
gujhr
I am doing manual grep for each of the string to find the line count. The command i am using right now is:
grep mark... (3 Replies)
Discussion started by: salaathi
3 Replies