Search Results

Search: Posts Made By: angheloko
1,352
Posted By angheloko
Oh, my bad. I misinterpreted because of this...
Oh, my bad. I misinterpreted because of this line. I though that the "whole" line should be ignored. Sorry man :P
1,352
Posted By angheloko
Hope this helps: sed "/ *$/d"...
Hope this helps:


sed "/ *$/d" TNS.txt
2,736
Posted By angheloko
You can store it in a shell variable. Let us look...
You can store it in a shell variable. Let us look into your script so we can edit it as needed :)
10,407
Posted By angheloko
Hope this helps: ddl10197@GT109867 ~ $...
Hope this helps:


ddl10197@GT109867 ~
$ sort foo | uniq > foo.tmp

ddl10197@GT109867 ~
$ sort bar | uniq > bar.tmp

ddl10197@GT109867 ~
$ comm -23 foo.tmp bar.tmp
GlobalUserManagement...
30,171
Posted By angheloko
Why not create an ed script instead? And then use...
Why not create an ed script instead? And then use 'patch'? But that would still require a temp file in the background though you wouldn't notice.
2,215
Posted By angheloko
Hope this helps: cut -f1 -d"," file1 >...
Hope this helps:


cut -f1 -d"," file1 > keys
cut -f1 -d"," file2 >> keys
sort keys | uniq -ud | while read X; do
echo "$X,"`sed -n "/^$X/p" file1 | cut -f2 -d","`","`sed -n "/^$X/p" file2 |...
4,219
Posted By angheloko
Try this one: sed 's/ {1,}/ /g' foo | tr...
Try this one:


sed 's/ {1,}/ /g' foo | tr -s " " "\n" | awk 'BEGIN {FS=","} { for (i=1;i<=NF;i++) sum[i]=sum[i] + $i } END { for (i=1;i<=NF;i++) printf("%d,", sum[i]) }'
21,632
Posted By angheloko
:confused: I'm not sure what you're getting...
:confused:

I'm not sure what you're getting at or what your desired output really is but if you just need to display:

12:00 3:00
Line |_________|


Then just:


echo "12:00 3:00"
echo...
4,219
Posted By angheloko
Hmmm...Could you post sample input and output? ...
Hmmm...Could you post sample input and output?

I got the ff:


$ cat foo
0,9607,12887,24088,
579,248,404,385

$ awk 'BEGIN {FS=","} { for (i=1;i<=NF;i++) sum[i]=sum[i] + $i } END { for...
4,219
Posted By angheloko
You can still use the little "Search" button,...
You can still use the little "Search" button, man. I found some threads similar with this one, but here goes:

awk 'BEGIN {FS=","} { for (i=1;i<=NF;i++) sum[i]=sum[i] + $i } END { for...
18,847
Posted By angheloko
Ok...You did read previous posts right?
Ok...You did read previous posts right?
4,219
Posted By angheloko
With a little help from the "Search" button: ...
With a little help from the "Search" button:

https://www.unix.com/cfmgoogle.php?cx=partner-pub-6323928554267084%3Absye1r5tx7j&cof=FORID%3A10&q=awk+get+difference+2+columns&sa=Search#1313
21,632
Posted By angheloko
Yeah, I think you should need to be more specific...
Yeah, I think you should need to be more specific and detailed with your question. But if all you need to do is print a simple horizontal/vertical line then you can try the ff.:


yes "|" | head...
2,980
Posted By angheloko
I suggest script! :)
I suggest script! :)
2,914
Posted By angheloko
Out of curiosity, I also tried some testing...
Out of curiosity, I also tried some testing myself. On a file with 250 lines there's no difference.

But on a file with 1000 lines, cut was faster by 1 sec.

On a file with 10000 lines, the...
7,255
Posted By angheloko
Ok, I get it. Sorry man. But I think Ygor got it...
Ok, I get it. Sorry man. But I think Ygor got it :)
7,255
Posted By angheloko
You can use sed or tr. The ff. links may prove to...
You can use sed or tr. The ff. links may prove to be useful:

https://www.unix.com/shell-programming-scripting/19160-how-remove-spaces-string-using-sed.html
...
4,285
Posted By angheloko
Hmmm...I'm not great at explaining but here...
Hmmm...I'm not great at explaining but here goes...

Think of \1, \2, \3, ..., \n as "place-holders". This is where results from your searching are placed.

In sed, you can assign a result to a...
4,285
Posted By angheloko
It's better if you provide more details but hope...
It's better if you provide more details but hope this helps:


echo '/data}/{bla/${INSTANCE}' | sed 's/.*${*\([A-Za-z0-9]\{1,\}\)}*.*/\1/'
9,567
Posted By angheloko
Hi, hope this helps. Please post output of this: ...
Hi, hope this helps. Please post output of this:

ls *.c && echo "Files found"

From here we can create a more flexible/complete code
10,407
Posted By angheloko
You can use comm -13 or comm -23. Just play with...
You can use comm -13 or comm -23. Just play with it a little
4,705
Posted By angheloko
Hey, try updating the red line: ...
Hey, try updating the red line:


#!/bin/ksh

##checking the Command Line Parameter
if test $1 = ""
then
echo "Config File is not provided as Input ">>/data/coml/logs/cnt_log.txt...
1,770
Posted By angheloko
Hope this helps: sort -n -t"." -k4...
Hope this helps:


sort -n -t"." -k4 match.txt
2,554
Posted By angheloko
I would suggest to separate "paragraphs" with a...
I would suggest to separate "paragraphs" with a blank line such that the file will look like this:


Statement Date : Blah blah
Blah blah
Blah blah
Blah blah Blah blah Blah blah Invalid...
13,623
Posted By angheloko
:eek: Genius man! Good to know you got it. It...
:eek: Genius man! Good to know you got it. It ended up me leaning something new. I should thank you! :b:
Showing results 1 to 25 of 123

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