I have a file containing many times the word "IPaddress". and i need a command that finds that string or word and print it only once. I've tried the following but they print a line for each match:
Having trouble understanding what you want, here are a couple of examples
This should print out the path of any file containing your string, note I used -type f to avoid looking at directories or special files and the -print0 and -0 args are to support files/directories with spaces -r stops grep being run if no files exist under path (ie find did not match any files):
This will print "IPaddress" if the given file contains the string
Please help .
The script need to first grep for all lines with "C:" as it contains a value
Here the value is 0
1,00: This , is a good script c:0
and then give output of the lines with top 3 highest value for c:
1,00: This , is a nice script c:9999
1,00: This , is a... (3 Replies)
In python how we need to print a same string many times without using loop.
I cane across something like * operator for this .
How we Can use this in a print statement ?
I am using python 3.x
Please help me (7 Replies)
Hello Everyone,
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Hi,
A very Good Evening to All,
I am writing a script for my application. I have a file with 1000 lines. Among that 1000 lines i am searching for a particular string. And from that string i need to pull all the data in to a seperate file.
For example the contents of my file is as below.
... (4 Replies)
Hi, been about 10 years since I've scripted, so very rusty and could use some quick help.
I have a file that contains data like such:
folder1 jondoe owner janedoe reader joeshmo none
folder2 jondoe none janedoe none joeshmo owner
folder3 jondoe owner
folder4 janedoe owner joeshmo... (7 Replies)
Hi,
We are facing some issues while finding the particular string.
Our file is:
cat 1.txt
Node Name(s)
Preparation fragment
Partition:
Transformation instance:
Transformation:
Applied rows:
Affected rows:
Rejected rows:
Throughput(Rows/Sec):
Throughput(Bytes/Sec):
Last... (3 Replies)
hi
I have the input as follows
ABC =893
JKL = "jee"
alias PQR = 9833
alias STUVE = "kuiue"
I should be able to print as follows
ABC
JKL
alias PQR
alias STUVE
Thanks
Suresh (7 Replies)
How can I use Perl to a take a string of 10 characters and print the last five characters of the string in columns 1-5 and the first five in columns 6-10?
Result:
0123456789
5 0
6 1
7 2
8 3
9 4 (5 Replies)
I am trying to print a line using awk printf command. The problem I am having is that when the string has spaces in between, it only prints the word upto the first space.
For example, if my variable has "Hello World"
The output is only "Hello".
Here is the command I am using
echo $recCtr... (2 Replies)