Shell Scripting for Router, Switch & FW deviation


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Shell Scripting for Router, Switch & FW deviation
# 8  
Old 11-20-2012
Firstly, establish that ggrep exists.

Code:
ls /usr/sfw/bin/ggrep

If it does, did you run the alias command that Jim showed?

If ggrep does not exist, you have two options.

1. Install the SFW package.
2. Find an (possibly an awk or sed) alternative
# 9  
Old 11-20-2012
Please show the output of
Code:
which ggrep
find /usr -type f -name ggrep

If you want more help.
# 10  
Old 11-21-2012
hi,
o/p as required..
Code:
nitinjj@ac1oss1> find /usr -type f -name ggrep  
find: cannot read dir /usr/lib/cc-cfw: Permission denied  
find: cannot read dir /usr/lib/scn/bin: Permission denied  
find: cannot read dir /usr/lib/scn/lib: Permission denied  
/usr/sfw/bin/ggrep  
find: cannot read dir /usr/aset: Permission denied  
find: cannot read dir /usr/openv/var/vnetd: Permission denied  
nitinjj@ac1oss1> which ggrep  
ggrep: Command not found.

Moderator's Comments:
Mod Comment edit by bakunin: Please view this code tag video for how to use code tags when posting code and data.

Last edited by bakunin; 11-23-2012 at 08:03 AM..
# 11  
Old 11-23-2012
Quote:
Originally Posted by GautamSK
hi,
o/p as required..
Code:
nitinjj@ac1oss1> find /usr -type f -name ggrep  
/usr/sfw/bin/ggrep
nitinjj@ac1oss1> which ggrep  
ggrep: Command not found.

As a user posting in the "Unix for Advanced and Expert Users" you should be comfortable with the concept of the PATH-variable.

I suggest you read up on the meaning of this while i transfer this thread to the to the "Unix for Dummies Questions & Answers" section.

I hope this helps.

bakunin
These 2 Users Gave Thanks to bakunin For This Post:
# 12  
Old 11-23-2012
@bakunin


I have sent o/p as asked.
Why u have changed section ?

If u have any soln to this..
Plz post ...
# 13  
Old 11-23-2012
You have or are learning unfortunately for you the hard way that linux is not UNIX...
In other words : What you write that runs on a SOLARIS, has great chances to run an a HP-UX and a AIX if by bad luck it doesnt it is going to be quite easy to correct, but so far I migrate SOLARIS to AIX, AIX to HP-UX, HP-UX to AIX and found very few issues, but scripts coming from linux seem to almost always give trouble...
Your only alternative is to get I suppose to gnu utils installed on your SUN or get the missing package as already mentionned and use ggrep, and dont blame the others they have been quite clear, just to sho you what you are missing:
Code:
lo4:/export/home/vbe $ which ggrep
/usr/sfw/bin/ggrep
lo4:/export/home/vbe $ uname -rs
SunOS 5.10
lo4:/export/home/vbe $ what /usr/sfw/bin/ggrep
/usr/sfw/bin/ggrep:
        SunOS 5.10 SunOS Development May 2004
lo4:/export/home/vbe $ what /bin/grep
/bin/grep:
        SunOS 5.10 Generic January 2005

 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to switch user in shell scripting (without root)?

Hi everyone: I need create a script that must switch user and then must execute certain commands, sadly neither my user nor the second user have no privileges for su - , I've tried everything but seems su doesn't accept input redirection, please help me, ... (4 Replies)
Discussion started by: ooilinlove
4 Replies

2. Shell Programming and Scripting

Help me to perform count & group by operation in shell scripting?

Hi All, I want to display the distinct values in the file and for each distinct value how may occurance or there. Test data: test1.dat 20121105 20121105 20121105 20121105 20121106 20121106 20121106 20121105 I need to display the output like Output (2 Replies)
Discussion started by: bbc17484
2 Replies

3. Shell Programming and Scripting

guidance required: feed load search & display in shell scripting

Hi All, I am fairly new to Shell Scripting, however learning fast ;-) I have been asked to do the below basic shell script :confused: There are few feed files we are recieving in the server from multiple locations spread out during the day, rite now we are checking manually each file... (2 Replies)
Discussion started by: sachaan
2 Replies

4. Post Here to Contact Site Administrators and Moderators

kindly reconsider my post in shell & scripting forum

Hi, this is regarding my post "ksh: how to extract strings from each line based on a condition" . Its not a home work or an assigment. I actually work in retail domain. The data I handle is very complex and confidential.So I can't divulge the actual patterns. In order to explain my problem, I have... (1 Reply)
Discussion started by: angie1234
1 Replies

5. Shell Programming and Scripting

AWK script for standard deviation / root mean square deviation

I have a file with say 50 columns, each containing a whole lot of data. Each column contains data from a separate simulation, but each simulation is related to the data in the last (REFERENCE) column $50 I need to calculate the RMS deviation for each data line, i.e. column 1 relative to... (12 Replies)
Discussion started by: chrisjorg
12 Replies

6. Shell Programming and Scripting

How to switch user in shell scripting (without sudo)?

Hi everyone: I have a big trouble, I need create a script that must switch user and then must execute certain commands, sadly neither my user nor the second user have no privileges for sudo, I've tried everything but seems su doesn't accept input redirection, please help me, it's very... (8 Replies)
Discussion started by: edgarvm
8 Replies

7. IP Networking

EeePC & F5D7230-4 router help

I have a desk top PC, DSL modem, HP C5180 All-in-One, F5d7230-4 router and a second desk top PC with a wireless card. These all work together fine. I bought an Asus EeePC with Linux as the operating system. I can take the EeePC to a coffee shop or city library and log onto the net with no problems.... (2 Replies)
Discussion started by: royace@juno.com
2 Replies

8. Shell Programming and Scripting

Sql & Shell scripting book

Hi, I am looking for some books that have examples of both Oracle SQL and Shell script being used together. For example, to insert 500 rows into a table using a script. I already have books that cover Shell scripting or SQL, but as separate subjects. I am looking for books that have both of... (3 Replies)
Discussion started by: handle123
3 Replies

9. UNIX Desktop Questions & Answers

Shell scripting & programming languages

If I want to do high-end 3d animation, what skell scripting languages, and programming languages shoul I learn? If you know any good resources for learning these languages they would be appreciated. (1 Reply)
Discussion started by: aloysius1001
1 Replies
Login or Register to Ask a Question