Search Results

Search: Posts Made By: ramneim
4,177
Posted By ramneim
oh here are the scripts. :(
oh here are the scripts. :(
4,177
Posted By ramneim
hi Chubler_XL, though i think this is already...
hi Chubler_XL, though i think this is already working perfectly fine, is it possible to do some final adjustments/modifications to this code?

it seems that the script works when you have key...
4,177
Posted By ramneim
Thanks you guys, i think the first one you posted...
Thanks you guys, i think the first one you posted works just fine, i guess.

Thanks a lot for all your help! :b:
4,177
Posted By ramneim
wow, that's a really clever thing you did there....
wow, that's a really clever thing you did there. really brilliant idea.

Though, does it really have to be "none" with quotation marks(" ")?

it seems that when i put only none, it doesn't work....
4,177
Posted By ramneim
hi Chubler_XL, thanks again for your reply. you...
hi Chubler_XL, thanks again for your reply.
you have no idea, how much i appreciate it.

i apologize if i still have concerns, even after such a long conversation.

it's just that for this 2nd...
4,177
Posted By ramneim
thanks again Chubler_XL, sir, for this. ...
thanks again Chubler_XL, sir, for this.

though please bare with me for my questions again. i really want to learn all these codes that you've helped me with.

so this is the code before, right?...
4,177
Posted By ramneim
hi Chubler_XL, my man, this is so cool, i tried...
hi Chubler_XL, my man, this is so cool, i tried executing the code you posted, and i actually changed 7 to 4 in EXC, because it worked the first time,

So for the first scenario, NO second file:
$...
4,177
Posted By ramneim
okay, thanks for the answers to those questions....
okay, thanks for the answers to those questions. i really appreciate it a lot.

so in the change that you made to the code:
FILENAME != "-" {sub(/,.*$/,"");if(FNR>1)EXC[$0]; next}
!($7 in...
4,177
Posted By ramneim
here is what the second file looks like. It is...
here is what the second file looks like.
It is a csv file(comma delimited), the header row/first line of this 2nd file should be ignored/skipped as well.

$ cat flagfile.csv
UPC,name...
1,978
Posted By ramneim
hi guys, thanks a lot for your replies, it...
hi guys, thanks a lot for your replies,

it seems that the problem is the FTP transfer mode i used,

before i used binary mode, which resulted to this error..

i changed the Transfer type to...
1,978
Posted By ramneim
im sorry if i dont understand your suggestion...
im sorry if i dont understand your suggestion correctly.. is it like this?

$ sh getsums.sh -vx ft-GNCT-3398-CD-2012-07-07-140112.txt.gz " " 22 23 1 2 4

.:Summation Tool:.
getsums.sh[36]: ^M: ...
1,978
Posted By ramneim
$ cat getsums.sh |head -39 #!/usr/bin/sh . ...
$ cat getsums.sh |head -39
#!/usr/bin/sh
.
.
.
for FILE in ${FILENAME}
do >> line 39
gzip -t ${FILE} 2>/dev/null
1,978
Posted By ramneim
What's wrong with the do statement?
hi guys,

here's the code

$ cat getsums.sh
#!/usr/bin/sh
FILENAME=$1
DELIMITER=$2
FIRST_COL=$3
SECOND_COL=$4
SALESDATE_COL=$5
STOREID=$6
UPC=$7
GTIN=$8
PROMOID=$9
echo ""
echo...
4,177
Posted By ramneim
Thanks again Chubler_XL for your inputs, i really...
Thanks again Chubler_XL for your inputs, i really appreciate it.

so basically, the arguments would be like this:

$1 = ft-gnct-3398-cd-2012-07-07-140112.txt.gz (1st filename)
$2 = " "
$3 =...
4,177
Posted By ramneim
no sir, i just need help that's all, and i just...
no sir, i just need help that's all, and i just want to learn how to this particular modification, and it's a bit different.
i'm just honestly seeking for help from you guys.

---------- Post...
4,177
Posted By ramneim
hi there, Chubler_XL, thanks a lot for your...
hi there, Chubler_XL, thanks a lot for your reply.

Although, do i need to add it to every if/elif statement?

and also, i'm not quite familiar with this EXC command, what exactly would it do?
...
4,177
Posted By ramneim
Modification of Summation Script
hi guys,

i have a script that basically just sums up the values of 2 particular columns in a file, grouped by the columns specified as well

The script is quite long, but it's basically just...
3,250
Posted By ramneim
hmm okay, thanks a lot for your help! it's...
hmm okay, thanks a lot for your help! it's getting pretty late here already, it's 1 in the morning, and im already sleepy, i'll add these in my script, and maybe show it to you tomorrow, if i bump...
3,250
Posted By ramneim
oh yeah, got it, forgot about that, so i'll just...
oh yeah, got it, forgot about that, so i'll just put an if statement in the begin section, to check if there's a 2nd or 3rd file.

i'm actually getting the hang of it now, that getline suggestion...
3,250
Posted By ramneim
okay, i'm taking all your suggestions into...
okay, i'm taking all your suggestions into consideration, coz I basically don't know what's the best thing to do here, so

in that BEGIN section, is it okay if the file that i will load there is...
3,250
Posted By ramneim
hmm okay, how about the scenario where i want...
hmm okay, how about the scenario where i want some rows to be ignored when they are summed?

how can i add to the script, where in it also references to the 2nd and 3rd file, to look for some...
3,250
Posted By ramneim
i have this script that basically sums two...
i have this script that basically sums two columns in a file, but does not group data.. and does not consider records to be ignored, so i wanted to add that function to improve this script..

it...
3,250
Posted By ramneim
HELP with Unix scripts in summing columns in a file
1. The problem statement, all variables and given/known data:
Hi guys, i'm a new guy here, and it's my first time creating a unix script.
can you guys help me out here? i'd really appreciate it. :(...
1,694
Posted By ramneim
it's actually a project in class, and it's due...
it's actually a project in class, and it's due next week, i would really really appreciate it if you could help me in this. thanks a lot man.
3,463
Posted By ramneim
oh im terribly sorry about this. :( i...
oh im terribly sorry about this. :(

i created a new thread with this title just now: "HELP with Unix scripts in summing columns in a file."

and im basically a noob, and i dont know how to do...
Showing results 1 to 25 of 27

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