Search Results

Search: Posts Made By: nanthagopal
3,906
Posted By nanthagopal
Thank you for your reply, I have used the...
Thank you for your reply,

I have used the above mentioned.

It's working good.

Regards,
Nanthagopal A
3,906
Posted By nanthagopal
I hava a file named: file1.txt I need to...
I hava a file named: file1.txt

I need to print the lines matching either the strings (string1 or string2)

for e.x,

using ordinary grep, we can do

grep "string1\|string2...
3,906
Posted By nanthagopal
I need to search for both the string.
I need to search for both the string.
3,906
Posted By nanthagopal
Whether we can search multiple strings using or in grep -F
Hi,

Whether we can search multiple strings using or in grep -F

In Generally,

grep -F "string1" "filename.txt"

How to search for multiple string using grep -F as we using grep

grep...
1,087
Posted By nanthagopal
How to print the lines in a file for the given string?
Hi,

I have a file with contents
test id text day
test sah dh dhs
yeay fg jsh jsjk


my need:

I give a string as a input, it check the file and display the lines with the given string
...
9,340
Posted By nanthagopal
I have change grep to fgrep and still same...
I have change grep to fgrep and still same performance
9,340
Posted By nanthagopal
Speed Up Grep
Hi,

I have to grep string from 20 - 30 files each carries 200 - 300 MB size and append to the
file. How to speed the
grepping time.

cat catalina.out_2012_01_01 | grep...
2,113
Posted By nanthagopal
Problem while assign string (words with tab) to a variable
Hi,

I have a String(words with tab space) in a file ->file1.txt
0xxxx 11 test $aa$ 8.43

when i read the file and assign to variable
value=$(cat file1.txt)
echo...
1,735
Posted By nanthagopal
Thank you for your reply. I have used the...
Thank you for your reply.

I have used the above command as follows,

#!/bin/bash

fnid() {
final=$(echo $1 | awk '{for(i=0;i<length($0);i++) {printf("*")} }' FS= OFS= )
echo $final
}
...
11,280
Posted By nanthagopal
How to run the Shell Script from external directory using java?
Hi,

I have created a Shell Script and invoke through java using Process Builder

It's working fine, if (Shell script file ) in the same directory as java file.

By Problem:

...
1,735
Posted By nanthagopal
String Replace by *
Hi,

I want to replace the string with * using shell commands

For e.g,
MyString : test

Output : ****


Please Suggest me,
Regards,
Nanthagopal A

Please use code tags...
1,542
Posted By nanthagopal
Problem with expr command in shell script
Hi,

I have used expr command to increment the date.

for e.g.,

case 1 :
echo $(date -d $(echo `expr 20010101 + 1`))

it returns
Tue Jan 2 00:00:00 IST 2001

case 2:
echo $(date -d...
1,672
Posted By nanthagopal
Problem with filter data using sed command
Hi,

I am using the following command(sed) to get the key/value pair from the string


String="{ "test":"test message", "testmessage":"subscription is active, charge successfully} " }"...
2,287
Posted By nanthagopal
yes. i have called that function. while running...
yes. i have called that function. while running in Konsole i got the output. But when invoke through Java Program. Only function not get executed. other things are working.



#!/bin/bash
...
2,287
Posted By nanthagopal
Problem while Invoke Shell Script function from Java Program
Hi,

I have create a Shell Script, with one function.

I want to call the script file in Java Program.

It working fine. but the problem is the function in the Shell Script is not executed.

...
6,551
Posted By nanthagopal
No, i don't need for time. Now it's working fine....
No, i don't need for time. Now it's working fine.
Thank you for your reply.


sort -t"." -k3.1,3.4n -k2,2n -k1,1n
Could you please explain the above code.



Regards,
Nanthagopal A
6,551
Posted By nanthagopal
I have used the above code and got the result in...
I have used the above code and got the result in sorted order as below.

08.05.2012 10:52:32 User: xxxx
15.05.2012 11:30:38 User: xxxx
22.05.2012 11:56:39 User: xxxx
29.05.2012 16:33:04 User:...
3,916
Posted By nanthagopal
Hi, I have 4 Sub-Process. for each process...
Hi,

I have 4 Sub-Process. for each process i want to grep some string and finally print each sub-process results.

I have used find | xargs grep comand for grepping, the code as follows

...
6,551
Posted By nanthagopal
How to Sort by Date and Time?
Hi,

The input file is as follows,

22.06.2012 17:58:38 CPUser: xxxxxxx, billedAfterStatus: Active
13.07.2012 08:46:15 CPUser: xxxxxxx, billedAfterStatus: Active
20.07.2012 08:56:24 CPUser:...
3,916
Posted By nanthagopal
Performance issue while using find command
Hi,

I have created a shell script for Server Log Automation Process. I have used

find xargs grep command to search the string.

for Example,
find -name | xargs grep "816995225" >...
1,676
Posted By nanthagopal
How to Call a Function
Hi

I have created a function in a Shell Script test.sh

function fnTest()
{
echo "My first Method
}


I have called this function in my test.sh
cat abc.txt | grep...
5,155
Posted By nanthagopal
@agama I have used this code :find . -type f...
@agama

I have used this code :find . -type f ! -name test.txt | xargs grep "491629461544" >test.txt

It displays the Output with file name.

How to display the output without file name...
5,155
Posted By nanthagopal
How to export the string to a text file.
Hi,

I have used this find . -type f -exec grep "491629461544" {} \; > test.txt to find the string and export it to file.

The problem is, when i used the above command in Shell script,...
6,751
Posted By nanthagopal
Thanks for your reply, @Jairaj, ...
Thanks for your reply,

@Jairaj,

It's working fine. but using the above command, how to grep the string in this format
grep <string> | grep <string>
6,751
Posted By nanthagopal
How to grep all the files inside the directory and Sub directory
Hi,

I have used the command
cat * | grep -r <<String>> *

It returns:

cat : JAN : is directory
***********************
*********************

My directory structure:

log
...
Showing results 1 to 25 of 27

 
All times are GMT -4. The time now is 08:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy