Sponsored Content
Full Discussion: Struck at shell command
Top Forums Shell Programming and Scripting Struck at shell command Post 302959753 by buzzme on Thursday 5th of November 2015 05:22:06 PM
Old 11-05-2015
Struck at shell command

Can someone help me to get two different outputs mentioned in code tags.
Input:

Code:
user=alexander
registeredwebsite=yahoo.com

user=james
registeredwebsite=gmail.com
registeredwebsite=fb.com
registeredwebsite=google.com

user=kelly
registeredwebsite=gmail.com
registeredwebsite=fb.com
registeredwebsite=google.com

user=natasha
registeredwebsite=gmail.com
registeredwebsite=fb.com
registeredwebsite=yahoo.com

user=bipasha
registeredwebsite=hotmail.com
registeredwebsite=medicus.com
registeredwebsite=yahoo.com

user=paul
registeredwebsite=yahoo.com

user=mike
registeredwebsite=yahoo.com



Need List of users registered only in yahoo.com website.

Output-1:

Users Registered only on yahoo.com website are:

Code:
user=alexander
user=paul
user=mike

Need list of users registered not only yahoo but also other websites.

Output-2:

Users Registered on yahoo.com but also other websites are:

Code:
user=natasha
user=bipasha

Moderator's Comments:
Mod Comment Surrounding your entire post with ICODE tags is not what is expected. Use CODE tags around sample input, around sample output, and around code segments.

Last edited by Don Cragun; 11-05-2015 at 06:32 PM.. Reason: Fix ICODE tags; add CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (0 Replies)
Discussion started by: bosskr
0 Replies

2. HP-UX

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (1 Reply)
Discussion started by: bosskr
1 Replies

3. Shell Programming and Scripting

Awking!! Printing decimal output is struck

Hi friends, I have a small problem with AWK. I am not able to print decimal values! :confused: below is my code: #! /bin/awk -f awk BEGIN{printf("%d",123)}; -> This prints the integer properly. x=111 awk BEGIN{printf("%d",x)}; -> This doesnt print! :( Please help me solve this. It... (4 Replies)
Discussion started by: divzz
4 Replies

4. Shell Programming and Scripting

Need to Write Shell Script based off of this shell command

I'm trying to read a bunch of log files and output the lines that contain particular strings. To accomplish this, I've been running the following from the command line: find . -name "*" | xargs grep " " | grep " " > output.txt Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies

5. Shell Programming and Scripting

can anyone help with shell script command about searching word with grep command?

i want to search in the current directory all the files that contain one word for example "hello" i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies

6. Shell Programming and Scripting

Struck with Typeset Command

Can someone explain whats this below command will do exactly.. typeset tmpFile1 tmpDir1 rc fileName fullName bc typeset tmpFile1 tmpFile2 rc fileSuffix uef typeset origFile bc fullName tmpDir1 remoteCmd inFile newInFile typeset num fn curDate fileSuffix ucFileName Since i'm new to... (1 Reply)
Discussion started by: help_scr_seeker
1 Replies

7. Shell Programming and Scripting

Any shell or hack that makes the shell command line take vi commands?

basically i'm tired of hitting the left arrow a few dozen times when correcting a mistake or modifying a history command i'd like to use vim style key shortcuts while on the command line so that a 55 moves the cursor 55 places to the left... and i want all the other vi goodies, search of... (3 Replies)
Discussion started by: marqul
3 Replies

8. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

9. UNIX Desktop Questions & Answers

command to run another shell on top of your default shell?

Can someone point me to the right command to to run another shell on top of your default shell? Thanks PS If admin sees this It is not home work. I am old man who wants to learn unix in my spare time. I CURRENTLY DO NOT GO SCHOOL, COLLEGE OR UNIVERSITY. (2 Replies)
Discussion started by: Bill Thompson
2 Replies

10. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
Finance::Quote::Yahoo::NZ(3pm)				User Contributed Perl Documentation			    Finance::Quote::Yahoo::NZ(3pm)

NAME
Finance::Quote::Yahoo::NZ - Fetch nzn stock quotes via Yahoo. SYNOPSIS
use Finance::Quote; my $q = Finance::Quote->new; my %info = $q->fetch("yahoo_nz","DPC"); # Use this module only. my %info = $q->fetch("nz","DPC"); # Failover with other methods. DESCRIPTION
This module allows information to be fetched from Yahoo about stocks traded on the New Zealand Stock Exchange. Information about indexes is not available through this module. This module is loaded by default on a Finance::Quote object, although it can be explicitly loaded by passing the argument "Yahoo::nz" to Finance::Quote->new(). This module provides only the "yahoo_nz" fetch methods. The author (stephen@vital.org.nz) will write a module to access the NZX site if asked nicely. Information obtained via this module is governed by Yahoo's terms and conditions, see http://au.finance.yahoo.com/ for more details. LABELS RETURNED
This module returns all the standard labels (where available) provided by Yahoo, as well as the currency label. See Finance::Quote::Yahoo::Base for more information. SEE ALSO
Yahoo Australia, http://au.finance.yahoo.com/ Finance::Quote::Yahoo::Base perl v5.14.2 2014-03-03 Finance::Quote::Yahoo::NZ(3pm)
All times are GMT -4. The time now is 02:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy