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
ISCSID(8)						   Linux Administrator's Manual 						 ISCSID(8)

NAME
iscsid - Open-iSCSI daemon SYNOPSIS
iscsid [OPTION] DESCRIPTION
The iscsid implements the control path of iSCSI protocol, plus some management facilities. For example, the daemon could be configured to automatically re-start discovery at startup, based on the contents of persistent iSCSI database. OPTIONS
[-c|--config=]config-file Read configuration from config-file rather than the default /etc/iscsi/iscsid.conf file. [-i|--initiatorname=]iname-file Read initiator name from iname-file rather than the default /etc/iscsi/initiatorname.iscsi file. [-f|--foreground] run iscsid in the foreground. [-d|--debug=]debug_level print debugging information. Valid values for debug_level are 0 to 8. [-u|--uid=]uid run under user ID uid (default is the current user ID) [-g|--gid=]gid run under user group ID gid (default is the current user group ID). [-n|--no-pid-file] do not write a process ID file. [-p|--pid=]pid-file write process ID to pid-file rather than the default /var/run/iscsid.pid [-h|--help] display this help and exit [-v|--version] display version and exit. FILES
/etc/iscsi/iscsid.conf The configuration file read by iscsid and iscsiadm on startup. /etc/iscsi/initiatorname.iscsi The file containing the iSCSI initiatorname and initiatoralias read by iscsid and iscsiadm on startup. /etc/iscsi/nodes Open-iSCSI persistent configuration database SEE ALSO
iscsiadm(8) AUTHORS
Open-iSCSI project <http://www.open-iscsi.org/> Alex Aizman <itn780@yahoo.com> Dmitry Yusupov <dmitry_yus@yahoo.com> July 2005 ISCSID(8)
All times are GMT -4. The time now is 02:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy