Linux command needed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Linux command needed
# 1  
Old 10-30-2016
Linux command needed

guys im new here and i need help with some linux commands.

filea has keyword on each line

Code:
identity
aaa
bbb
ccc


i have following commands.

Code:
egrep 'www.identity' ~/home/m3 >~/home/lopo2
wc -l file ~/home/lopo2


say lopo2 has 44 lines
then output saved is
Code:
identity 44


similarly script performs above 2 commands for all keywords in filea

final output is
Code:
identity 44
aaa 55
bbb 343
ccc 34345


Last edited by rbatte1; 10-31-2016 at 07:34 AM.. Reason: Added CODE tags
# 2  
Old 10-30-2016
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Linux router help needed

hi guys. I have an Kaon router wich runs "Linux version 3.10.24-svn1480 (jskim@jake-205) (gcc version 4.4.7 (Realtek MSDK-4.4.7 Build 1459". The problem I have it is that its firmware is in early stages and has alot of things messed up. Wake on lan doesn't work without arp binding and that can... (23 Replies)
Discussion started by: apoklyps3
23 Replies

2. Red Hat

Installing Linux on Vmware - Help needed

Hi Friends I am trying to install linux (32 bit) on windows. so i used Oracle virtual box and Vmware player in windows and installed them. but there is no category to select Linux version 7. how to install it pls help here. (7 Replies)
Discussion started by: ded325
7 Replies

3. UNIX for Advanced & Expert Users

Command help needed in linux flavour OS

HI, My requirement as below Log with Error Starting FeedRunner for feed: 200 Product example Items Error FeedRunner for feed: 200 Product example Items Stopping FeedRunner for feed : 200 Product example Items Feed time taken 231743 Log without Error Starting... (0 Replies)
Discussion started by: Paulwintech
0 Replies

4. Shell Programming and Scripting

Command needed in linux flavour OS

HI, My requirement as below Log with Error Code: Starting FeedRunner for feed: 200 Product example Items Error FeedRunner for feed: 200 Product example Items Stopping FeedRunner for feed : 200 Product example Items Feed time taken 231743 Log without Error Code: ... (0 Replies)
Discussion started by: Paulwintech
0 Replies

5. UNIX for Dummies Questions & Answers

LINUX to UNIX... changes needed?

I developed the following in LINUX: cat monica.txt | sed 's/;;;/\n;;;/g'> fixed.txt csplit -f comment -n 4 fixed.txt '/;;;/' {*} Basically, I want it to take the file monica.txt and put every instance of ;;; on a new line and put it in fixed.txt, then split fixed.txt at every instance of ;;;... (13 Replies)
Discussion started by: mschpers
13 Replies

6. UNIX for Dummies Questions & Answers

Linux Tutorial Needed

Hi guys , I m new to linux and would like to buy some quality video tutorials . Request you to guide me any good source for programming(C,Java,VB) or linux tutorials. Tutorials should be known and good like lynda.com (5 Replies)
Discussion started by: pinga123
5 Replies

7. UNIX for Dummies Questions & Answers

Help needed to understand partitions in linux

Hi guys, It has been more than 2 month i switched to linux but i m still very much confused how linux handles and names the partitions. I have gone through couple of beginners material and found linux doesnt treat partitions as c: and d: instead it uses /dev/hda1 /dev/hda2 hda3 .But now i... (7 Replies)
Discussion started by: pinga123
7 Replies

8. Shell Programming and Scripting

Command needed to Parse Catalina.out in Linux

Hi all, Everyday I used to parse the Catalina.out log file on my Redhat system for errors for a particular date. Could anybody be able to help me to create a command which can grep the contents of Catalina.out starting from particular date. Please do not suggest command which greps only the... (12 Replies)
Discussion started by: redhatperl
12 Replies

9. Programming

Help needed linux socket programming in c

Good evening everyone! :) I'm doing a small client / server application for sharing files in C, and I am trying to implement the following: The client of my application sends to the address 255.255.255.255 a message requesting a particular file.In the network there is only one server,... (1 Reply)
Discussion started by: esmeco
1 Replies

10. Shell Programming and Scripting

Linux starter help needed

:confused: hi guys i'm helping out as a lab assistant and have been told to use a linux shell script to gather assignments from the students in the class I'm helping out in. They've been told to have their assignment in a certain folder in their accounts and I'm to gather them, only problem is I... (0 Replies)
Discussion started by: jaybee
0 Replies
Login or Register to Ask a Question