Search Results

Search: Posts Made By: hellsd
5,163
Posted By hellsd
My current Script:
This is the start but i have problem on duplicate data, does anyone have any idea regarding it

BEGIN { FS=OFS="^" }
{
arr[$1] = ($1 in arr) ? arr[$1] "," $2 : $2
arr2[$1] = ($1 in arr2)...
5,163
Posted By hellsd
group by for lines
I post my question here also because i have a difficult script to create that do the following:

The examples i got dont support it.
Lets say the input file is:
ABC^1^~^data^x
ABC^2^~^data^x...
3,124
Posted By hellsd
Now it is more complicate:
Lets say the input file is:
ABC^1^~^data^x
ABC^2^~^data^x
ABC^3^~^data^x
DEF^4^~^data^y
DEF^4^~^data^z
DEF^5^~^data^y
DEF^5^~^data^z
DEF^6^~^data^z
DEF^6^~^data^y
XYZ^7^~^data^t

Now I...
3,124
Posted By hellsd
3,124
Posted By hellsd
thank for the example but it doesn't handle
where the delimiter is ^ and if the concatenated field is not last.

Any idea ?
3,124
Posted By hellsd
group by in files :-)
My file looks like:

X^~^12^d
X^~^19^d
Y^~^5^d
Y^~^10^d
Y^~^11^d
Z^~^14^d

I need a script that will "group by" the first field and Concatenate the values.

My output should be:
...
1,914
Posted By hellsd
what is with the fgrep? will run faster?
what is with the fgrep? will run faster?
3,813
Posted By hellsd
Another question, if you don't mind
I am working on solaris machine.

Can I change the e-mail in From: header

Currently it sends e-mail From: dev1@domain.com
Instead, I would like it to be From: SysAdmin

Thanks in advance.
3,813
Posted By hellsd
3,813
Posted By hellsd
mailx and awk- didn't find an answer KSH
Hi folks,

My input file's content:
You are line1
You are line2
You are line3
etc...


I need to write a script that for every line, it will send an e-mail and the body will hold the line:
...
26,607
Posted By hellsd
Thanks for everyone
I find this very helpful and hope that other people like me can use it on the future.
26,607
Posted By hellsd
Wow, thnaks you all, I have peformence
question:

I have about 150 files to process every night.
The size of each file can be between 5Mb to 20Mb.

What is more efficient to use?

thanks you all guys, you are great and I like this...
26,607
Posted By hellsd
Last time I hope...
I call to your script runIt
I replace file1 with $1

Now I run it:
runIt file1

Output:

I get file2 with the correct lines, but they are all in lowercase.

I look at the unix console and...
26,607
Posted By hellsd
Ok. sorry, here you go
Input file:

line 1: David, password: ab4TkN
line 2: Kevin, password: kRq5
line 3: kevin, PASSWORD: kRq5
line 4: abcd
line 5: efgh
line 6: ABCD
line 7: efgh

Output file:
line 1: David,...
26,607
Posted By hellsd
still doesn't solve my problem
Your script is great but it doesn't answer my question.

I need to keep the exact uniq content I have in the original file:
(suppose That each line has a pssword which is case sensetive)

So if...
26,607
Posted By hellsd
I still don't get it, look at my example
file1 contain:
danIel
Kevin
DON
KEVIN
don

If I run your command as the following :
cat file1 | tr "[a-z]" "[A-Z]" | sort -u >outputFile
outPutFile contain:
DANIEL
DON
KEVIN

And this...
26,607
Posted By hellsd
It is not good
Because then I will lose the real values in the original file and the data I will get will be like converted (from lower to upper or and vice versia), because the input in file can be for example:...
26,607
Posted By hellsd
Removing duplicate lines ignore case
hi,

I have the following input in file:
abc
ab
a
AB
b
c
a
C
B
When I use uniq -u file,the out put file is:
abc
ab
AB
c
v
B
C
1,914
Posted By hellsd
Thanks, works like magic.
Thanks, works like magic.
1,914
Posted By hellsd
script problems
Hi,

Here is an example of a problem I have:

File2: contain the following lines:
a^ aaa^aa aa^~
b^ bbb^bb bb^~
c^ ccc^cc cc^~
d^ dddd^dd dd^~

File1: contain the following lines:
b^...
Showing results 1 to 20 of 20

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