Search Results

Search: Posts Made By: spirm8
1,809
Posted By spirm8
Yup, that was the solution i went for aswell.. It...
Yup, that was the solution i went for aswell.. It was straight forward and works as desired. :)
1,809
Posted By spirm8
Sending through an external e-mail account
Hi guys.

After several Google hours, i've failed to find a solution to my problem, maybe my google skills arent that good - but i hope someone could help me figure this out.

I'm running a...
1,623
Posted By spirm8
Sigh. Your're right, I'm sorry. I can't...
Sigh. Your're right, I'm sorry.

I can't really give you a reason for why it is saying 5 users when you only have made 4 connections. Lets hope someone else can ;)
1,623
Posted By spirm8
In my case I sometimes run 3 ssh connections to...
In my case I sometimes run 3 ssh connections to my server through putty. In this case the user seems to do the same, and for each connection you will see a login from the user in the w-list :)
1,369
Posted By spirm8
Thanks, problem is solved - I removed the ^M in...
Thanks, problem is solved - I removed the ^M in vi using:
:%s/^M//g

and now sed is printing the desired :-)

Thanks for answers
1,369
Posted By spirm8
Still same problem. doing a vi...
Still same problem.

doing a vi test.txtrevealed ^M after each entry, and that explains it. I removed the ^M by doing a :%s/^M//g


Thanks for the input :-)
1,369
Posted By spirm8
Inserting text with SED
Hi guys,

I need to insert @test.com after each entry in my .txt file.

1
2
3
4

1@test.com
2@test.com
3@test.com
4@test.com

Tried to use
cat test.txt |sed 's/$/@test.com/'but it...
8,480
Posted By spirm8
Hi Scrut, Yeah it's basicly using the same...
Hi Scrut,

Yeah it's basicly using the same command over again?

grep -vf file2 file1

I could just compare them instead of trying to remove something from my prime list. Thanks :p
8,480
Posted By spirm8
I searched the forum for a oneliner that will be...
I searched the forum for a oneliner that will be able to remove a match between two files, but without luck.

file1:
1
2
3
4
5
6

file2:
1
2
3

Now its the other way around, if '3' is...
8,480
Posted By spirm8
Very wierd.. I dont know why its doing that o_O ...
Very wierd.. I dont know why its doing that o_O

The grep -vf works as it should tho... heh
8,480
Posted By spirm8
Hi, thanks for the quick reply. When i use: ...
Hi, thanks for the quick reply.

When i use:

awk 'NR==FNR{a[$1]; next}!($1 in a)' file2 file1

I get:
3
4
5
6

But 3 is in file2... is there a way to fix that?
8,480
Posted By spirm8
Lets say i now need to search for missing entries...
Lets say i now need to search for missing entries between two files. I would like to print $1 from file1 if the number isnt found in file2?

file1(total)
1
2
3
4
5
6

file2 (partial)
1
2...
8,480
Posted By spirm8
Thanks guys, I've got it working now :-)
Thanks guys, I've got it working now :-)
8,480
Posted By spirm8
Using nawk 'NR==FNR{a[$0]; next}$1 in a' file1...
Using
nawk 'NR==FNR{a[$0]; next}$1 in a' file1 file2 > test.txt

Dosnt seem to do the desired thing..

file1 is a little group of ID's i have which i need to get hold of their email associated...
8,480
Posted By spirm8
Hi, I think it might be too advanced for me to...
Hi, I think it might be too advanced for me to understand? I'm not getting anything out of the man page for grep using -f :(
8,480
Posted By spirm8
Yeah im using solaris, and nawk did the trick....
Yeah im using solaris, and nawk did the trick. Not getting any errors now :-) I doesn't seem to print anything out tho, is this wrong?

nawk 'NR==FNR{a[$1,$2]=$3;next} a[$1,$2]{print $2}' file2...
8,480
Posted By spirm8
Hi, thanks for answering. I'm getting this when...
Hi, thanks for answering. I'm getting this when trying to run it.

awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: bailing out near line 1
8,480
Posted By spirm8
Comparing two files and printing 2nd column if match found
Hi guys,

I'm rather new at using UNIX based systems, and when it comes to scripting etc I'm even newer.

I have two files which i need to compare.

file1: (some random ID's)

451245
451288...
Showing results 1 to 18 of 18

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