Search Results

Search: Posts Made By: not4google
3,081
Posted By not4google
Regular Expression - Replace if x contains y except if...
Hi all,

I have a file which contains 1000s of lines of text. I need to delete all lines with the words "Red" EXCEPT if the line also contains the word "GREEN"...

For example:

ThisIs some...
72,219
Posted By not4google
Thanks for the quick responses, I want to...
Thanks for the quick responses,

I want to search for a particular string and then append to the first line, is this possible with something like the following:

sed -e /test/s/$/ testString/;...
72,219
Posted By not4google
Thanks for the responses - is it possible to have...
Thanks for the responses - is it possible to have multiple sed commands in a statement so I can for example delete the lines with ">" and then delete instances of lines with "---" in them?

I tried...
72,219
Posted By not4google
SED: match pattern & delete matched lines
Hi all,

I have the following data in a file x.csv:

> ,this is some text here
> ,,,,,,,,,,,,,,,,2006/11/16,0.23
> ,,,,,,,,,,,,,,,,2006/12/16,0.88
< ,,,,,,,,,,,,,,,,this shouldnt be deleted...
5,036
Posted By not4google
Its fine I am going to use sed e.g. cat...
Its fine I am going to use sed e.g.

cat file1.csv | sed -e 's/replaceThisString/thisIsTheReplacementText/'
5,036
Posted By not4google
Modifying a csv file from Shell Script
Hi all,

I have some script that creates a temp csv file. What I need to do is do some search and replace and modify the file from my shell script. I know the commands to open the file and then...
4,885
Posted By not4google
Sorry my mistake, thanks for youre help it does...
Sorry my mistake, thanks for youre help it does work - I was using a slightly different source file (due to company sensitivity reasons)

THANKS AGAIN,
4,885
Posted By not4google
No I tried it and now Im not getting anything...
No I tried it and now Im not getting anything returned, where previous the issue was that all the lines were returned,
4,885
Posted By not4google
Hi thanks again for the suggestions, The...
Hi thanks again for the suggestions,

The data to be working on is:

,qwertyA, field1, field2, field3, field4, field5, field6
,,,,,,,,,,,,,,,,,,,100,200
,,,,,,,,,,,,,,,,,,,300,400
,qwertyB,...
4,885
Posted By not4google
This is the data to work on: ,qwertyA,...
This is the data to work on:

,qwertyA, field1, field2, field3, field4, field5, field6
,,,,,,,,,,,,,,,,,,,100,200
,,,,,,,,,,,,,,,,,,,300,400
,qwertyB, field1, field2, field3, field4, field5,...
4,885
Posted By not4google
AWK - Extracting matched line
Hi all,

I have one more query related to AWK. I have the following csv data:

,qwertyA, field1, field2, field3, field4, field5, field6
,,,,,,,,,,,,,,,,,,,100,200
,,,,,,,,,,,,,,,,,,,300,400...
10,613
Posted By not4google
Hi, tester contains: COMM_VOL.TEST and the...
Hi,

tester contains: COMM_VOL.TEST
and the sample input file:

,qwerty,qwerty,None,True,0,% ANNU actual/actual,0,False,@Constant,,,:,False,@Linear(),2006/1
0/06,Option Time,...
10,613
Posted By not4google
Hi thanks for the quick response, After...
Hi thanks for the quick response,

After adding the code suggested I am getting a response but it seems to be returning more than I expected. The value of tester is "qwerty1" and in the ...
10,613
Posted By not4google
Awk - Using a Shell Variable in the Reg Expression
Hi all,

I have a shell variable $test1 that holds a value derived from some other processing. What I need to do is use that $test1 as the input to a awk regular expression:

nawk -F"," -v...
2,164
Posted By not4google
Searching list of entries in file for actual files in dir
Hi all,

I have a file entries.txt that contains a number of entries all on seperate lines e.g.

test1
test2
test3
test4

Then in a directory called /TestFiles I have a number of files that...
Showing results 1 to 15 of 15

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