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. Shell Programming and Scripting
I have a file that I'm trying to place into a variable.
I've tried the following:
filez=$(cat /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
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
4. Shell Programming and Scripting
I have a file with information like this:
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
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. UNIX for Dummies Questions & Answers
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
7. UNIX for Advanced & Expert Users
I need to serach and replace strngs in a text file.
My file has;
books.amazon='Let me read'
expected output is
Can I first find the text between string1= books.amazon=' and string2= ' (locate the text... (1 Reply)
Discussion started by: Hiano
8. Shell Programming and Scripting
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
9. UNIX for Advanced & Expert Users
I have a text file in the format
and a second text file of the format
the last string in both the text files is of the... (4 Replies)
Discussion started by: kanthrajgowda
I need to find the line count of multiple strings in a particular file. The strings are as follows:
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