Search Results

Search: Posts Made By: flamingo_l
848
Posted By flamingo_l
Need solution to formatting issue
Hi All,

I have written a grep command to grep the files containing Windows directories.
I need to output this to a csv.

So here is the code.


OUTPUT_FILE="Sample-format.txt"...
2,080
Posted By flamingo_l
Thanks for your replies. Input directory may...
Thanks for your replies.

Input directory may not be same as the current directory. That i can modify as an input.

I want to apply some shell script to the files outputed by the above script.
...
2,080
Posted By flamingo_l
Listing the files of .cv and .config extension
hi all,

I have a directory which can contain multiple sub - directories.

My input would be the directory name.

Script should search in all the directories for the files having .cv and...
4,265
Posted By flamingo_l
The order is may or may not be constant. ...
The order is may or may not be constant.

First, am trying to get a script with order as constant.

---------- Post updated at 02:23 AM ---------- Previous update was at 02:06 AM ----------

...
4,265
Posted By flamingo_l
My requirement is: If my Function name...
My requirement is:

If my Function name extends 2 lines i need to merge to a single line.
Similarly changes or any other....

so i need to merge lines into 1 based on the heading --> Name ,...
4,265
Posted By flamingo_l
hi All, Sorry for the late reply. Thank you...
hi All,

Sorry for the late reply. Thank you all the replies.

code given by birei is working ...

@Birei,

Am new to sed so am trying to understand the code given by you.

sed -n '1h;2,$...
4,265
Posted By flamingo_l
Merging lines in a text file
hi,

I have a file as below:


Name: some_name
Date: some_date
Function Name: <some_function_name(jjjjjjjjj,
fjddddd, gggg, ggg)>
Changes:<Change A
more of change A>
Name: some_name...
1,759
Posted By flamingo_l
Thank you very much for your replies. hi...
Thank you very much for your replies.

hi rdcwayx,

The script given by you is not working as required. If the changes made exceeds more then one line, then it is not working.

hi Chubler_XL,
...
1,759
Posted By flamingo_l
Comparing and Formatting the text file
hi,

I need a script which can format the below text file which contains comments



file1.txt
--------

//START
//Name: some value
//Date:
//Changes:................
5,426
Posted By flamingo_l
Thank for your replies. hi bartus11, ...
Thank for your replies.



hi bartus11,


The code given by you is not working

As per my understanding , xargs would be executed in the output giveb by cut command above.

@kurumi,
...
5,426
Posted By flamingo_l
Search and Extract data between two strings
hi,

In a given directory, i need to search for a string (eg:ABCD).
For a given file, i have to extract the text between START and END strings .

I need to extract all the text between START...
15,910
Posted By flamingo_l
Thanks Franklin52.. It is working ... Since...
Thanks Franklin52.. It is working ...

Since am new to UNIX, can you please explain the awk part of the command you have wriiten ... am not getting how you have solved this.
15,910
Posted By flamingo_l
Output formatting of grep
hi,

I am trying to find the word "root" from the follwoing sample file:


#12.12.12.2222
echo "Hai........"
11.11.1.1111
3.23.AS.AA
ab.cd.df.rf
/usr/bin
jhhh 12.12.AF.12
/urf/sss/kk...
7,686
Posted By flamingo_l
The above script is not working for me :( ...
The above script is not working for me :(

---------- Post updated at 05:02 AM ---------- Previous update was at 05:01 AM ----------




Thanks Zaxxon :) It is working
6,716
Posted By flamingo_l
Thank you aigles
Thank you aigles
7,686
Posted By flamingo_l
This is not working if the infile has: echo...
This is not working if the infile has:

echo "Hai........"
abdfkljk 110.111.111.11 kjdkjjkjdk
11.11.1.1111
3.23.AS.AA
24.DD.DD.DDD
24.DD.DD
24.DD.DD.EE
ab.cd.df.rf
/usr/bin
jhhh...
6,716
Posted By flamingo_l
I have used notepad in windows to write my script...
I have used notepad in windows to write my script since i was using Cygwin. That created ^M characters at the end of each line. When i wrote my script using Text pad it worked ..... :)


set |...
7,686
Posted By flamingo_l
Thanks a lot ygemici... :) The below...
Thanks a lot ygemici... :)


The below code is working for me ....

grep -rn '\b[0-9a-fA-F][0-9a-fA-F]\.[0-9a-fA-F][0-9a-fA-F]\.[0-9a-fA-F][0-9a-fA-F]\.[0-9a-fA-F][0-9a-fA-F]\b' ex2.sh
...
6,716
Posted By flamingo_l
I want the script to grep the word echo in the...
I want the script to grep the word echo in the directories as well as subdirectories.

@Methyl, there are no files names in the directory which contains spaces.

@aigles,
when i give "type -a...
7,686
Posted By flamingo_l
Sorry .......... If suppose ex2.sh...
Sorry ..........



If suppose ex2.sh file content is





echo "Hai........"
abdfkljk 110.111.111.11 kjdkjjkjdk
11.11.1.1111
3.23.AS.AA
24.DD.DD.DDD
24.DD.DD
ab.cd.df.rf
/usr/bin...
7,686
Posted By flamingo_l
@Zaxxon, I want to match exactly XX.XX.XX.XX...
@Zaxxon,

I want to match exactly XX.XX.XX.XX only 4 sets.

@ygemici,

The one which you gave is also giving other lines.

ex2.sh

echo "Hai........"
abdfkljk 110.111.111.11 kjdkjjkjdk...
7,686
Posted By flamingo_l
Thanks rdcwayx... :) This is working if the MAC...
Thanks rdcwayx... :)
This is working if the MAC address is in the beginning of the line...

Suppose if the MAC adrress in between, it is not shown in the output :(
7,686
Posted By flamingo_l
Thanks Zaxxon... The second part is solved. ...
Thanks Zaxxon...

The second part is solved.

Can you please look at the first part.

grep -rn '^[0-9A-F]\{1,2\}\.[0-9A-F]\{1,2\}\.[0-9A-F]\{1,2\}\.[0-9A-F]\{1,2\}\$' *

I want to search for...
7,686
Posted By flamingo_l
Need help in Regular expression in bash shell
hi,

I have written a script to search MAC address in a given directory.
MAC address would be in format XX.XX.XX.XX.
The digits contain hexadecimal numbers.
For this i have used grep as...
Forum: Red Hat 07-26-2010
4,562
Posted By flamingo_l
Thank you
Thank you
Showing results 1 to 25 of 29

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