trying to view contents of an existing script | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

trying to view contents of an existing script

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-03-2012
slashbash slashbash is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 17 April 2013, 8:13 PM EDT
Posts: 32
Thanks: 10
Thanked 0 Times in 0 Posts
trying to view contents of an existing script


Code:
root#pwd
/opt/tools

root# cat check_traffic
/opt/tools/utils/commands $1 /opt/tools/utils/DIR/check_traffic

root# cat /opt/tools/utils/DIR/check_traffic
gew "check_traffic -v"

Hi above script works for checking traffic for an ip address im trying to view the check_traffic script by cat'ing it but I get the above error, can anyone help please? im logged in as root on solaris 8
Sponsored Links
    #2  
Old 03-03-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
What error?

The contents of the script are:
Quote:
gew "check_traffic -v"
Sponsored Links
    #3  
Old 03-03-2012
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 17 September 2014, 9:03 AM EDT
Location: NM
Posts: 10,208
Thanks: 278
Thanked 794 Times in 742 Posts

Code:
gew "check_traffic -v"

Not an error. Assume that code is run by username user1, as root:

Code:
su - user1
user1>  which gew
exit

gew is a command or an alias. On safe systems root should never have all of those oddball aliases and PATH values assigned. You have to go to whoever runs it to decode it.
    #4  
Old 03-03-2012
slashbash slashbash is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 17 April 2013, 8:13 PM EDT
Posts: 32
Thanks: 10
Thanked 0 Times in 0 Posts
no, there is a lot more involved to checking the trafic i.e if I was to do this manually I would first have to use ssh and then telnet, so I know the above is wrong
Sponsored Links
    #5  
Old 03-03-2012
ahamed101's Avatar
ahamed101 ahamed101 is offline Forum Advisor  
root is god!!!
 
Join Date: Sep 2008
Last Activity: 15 May 2014, 2:54 PM EDT
Location: San Jose, CA
Posts: 1,906
Thanks: 54
Thanked 485 Times in 478 Posts
Did you try Jim's suggestions? which gew

--ahamed
Sponsored Links
    #6  
Old 03-03-2012
slashbash slashbash is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 17 April 2013, 8:13 PM EDT
Posts: 32
Thanks: 10
Thanked 0 Times in 0 Posts
as standard user


Code:
# which gew
no gew in /opt/xdf/bin /opt/xdf-4.3.2/bin /bin /opt/tools /opt/tools/swdl/swdl-1.7.6p1/bin /usr/sbin /usr/local/bin /usr/local/sbin /opt/rsync-2.6.2/bin

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[Solved] How to view the contents of the .depot files skmdu HP-UX 2 03-30-2010 04:34 AM
Bash copy file contents into an existing file at a specific location gshepherd7 Shell Programming and Scripting 6 03-11-2009 09:26 AM
view libraries and contents of object files and shared library naren_chella HP-UX 4 06-22-2006 10:12 AM
view contents of shared library naren_chella Programming 4 05-26-2006 01:01 PM
Unable to view contents of a directory maddave UNIX for Dummies Questions & Answers 13 10-25-2001 01:50 AM



All times are GMT -4. The time now is 09:36 PM.