Sorry for the late reply but it was weekend already
I tried your code but i think i am missing something/doing something wrong.
when i run the script above i see that it is downloading the file (not shown above) but after that nothing happens. I am guessing that is because you mentioned file2 file3 in your version but technicly i dont have those anymore because everything is in this script from what i can see.
[EDIT]
Duh it helps if i actually add both filter files.
Lets compare both runs of the scripts:
Original.csv 6393 lines (this is the file that is downloaded without any script touching it)
file2 is the Word filter file, file3 the EAN filter file.
---------- Post updated at 16:30 ---------- Previous update was at 16:29 ----------
Again, allow to test the scriptlet by posting the desired result.
I just updated the script as i noticed it. Test results are also in the same post.
The output should look like the following:
The output that it gives is fine. The problem is that it seems to remove quite alot of lines. I will check out what kinda lines it removed and post those to see how it could be solved,
How can a clean file of 6393 lines come from 6393 line original file?
And, as said before, the criteria of what and when to remove/redistribute wasn't completely nor correctly recognized. You may want to respecify in detail.
Here is a short snippet of a sdiff between the 2 clean files. On the left is your output and on the right is the original output.
I have no results yet from the ean filter file as those arent saved on the machine but i will post them also later on.
---------- Post updated at 04:54 PM ---------- Previous update was at 04:52 PM ----------
Quote:
Originally Posted by RudiC
How can a clean file of 6393 lines come from 6393 line original file?
And, as said before, the criteria of what and when to remove/redistribute wasn't completely nor correctly recognized. You may want to respecify in detail.
You wanted suppliernumbers having a "-" sign to be removed. That accounts for
.
The "Bosch" line IS in BOTH result files. The "Singer" and "DeLonghi" lines differ in that decimals are not printed for integer numbers.
In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
In the awk below I am trying to remove all lines above and including the pattern Test or Test2. Each block is seperated by a newline and Test2 also appears in the lines to keep but it will always have additional text after it. The Test to remove will not. The awk executed until the || was added... (2 Replies)
Hi,
I'd be grateful for your help with the following. I have a file (file.txt) with 10 columns and about half a million lines, which in simplified form looks like this:
ID Col1 Col2 Col3....
a 4 2 8
b 5 6 1
c 8 4 1
d... (4 Replies)
I am trying to remove each line in which $2 is FP or RFP. I believe the below will remove one instance but not both. Thank you :).
file
12
123 FP
11
10 RFP
awk
awk -F'\t' '
$2 != "FP"' file
desired output
12
11 (6 Replies)
I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :).
grep
grep -v -F -f targets.bed sort_list
grep -vFf sort_list targets
awk
awk -F, '
> FILENAME == ARGV {to_remove=1; next}
> ! ($5 in... (2 Replies)
I have a file like this - I want to remove the 2015 (or any four digit #) from column $4 so I can get:
Nov 05 1997 /ifs/inventory2/
for example. Im not sure how. Should I use an if statement with awk?
Jan 16 2015 23:45 /ifs/sql_file
Jan 16 2015 23:45 /ifs/sql_file
Nov 05 2015 1997... (4 Replies)
I need to send email to receipient in each block of data in a file which has the sender address under TO and just send that block of data where it ends as COMPANY.
I tried to work this out by getting line numbers of the string HELLO but unable to grab the next block of data to send the next... (5 Replies)
Hi,
I need to get specific parts in a large file.
I need to:
Get a line containing an IP address, and read from there to another line saying ***SNMP-END***
So, I have the start and the end well defined, but the problem is that apparently the awk command using the -F option doesn't work... (17 Replies)
hi,,
i hav a file with many lines.i need to remove all lines before a line begginning with a specific pattern from the file because these lines are not required.
Can u help me out with either a perl script or shell script
example:-
if file initially contains lines:
a
b
c
d
.1.2
d
e
f... (2 Replies)
I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)