Env cmd


 
Thread Tools Search this Thread
Operating Systems Linux Env cmd
# 1  
Old 04-09-2013
Env cmd

Hello,

As a workaround for certain issue, I want to use SSH with a clean environment.
I tried this: env -i ssh, but it returns:
env -i ssh
grep: ssh: No such file or directory


As I'm a beginner, it would be great if you can suggest me, what is going wrong here.

Thank you,
# 2  
Old 04-09-2013
I don't understand your error message. It seems you've omitted something important. Where does grep come in?

Perhaps you should begin the story by describing the "certain issue" along with a more detailed description of your workaround.

Regards,
Alister
# 3  
Old 04-09-2013
You certainly have aliased the env command,
check with
Code:
which env
type env

To temporarily escape aliasing, do
Code:
\env -i ssh

Or in case you have another env executable in you PATH:
Code:
/usr/bin/env -i ssh

This User Gave Thanks to MadeInGermany For This Post:
# 4  
Old 04-10-2013
Hello,

Thank you for your reply.

which env
/usr/bin/env

type env
env is aliased to `env | grep -v `echo -e "\\e\["`'

It works with /usr/bin/env -i ssh.


Thank you,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Deny from env=env-variable Does not work

(Above from Apache docs). On my system, using: SetEnvIf User-Agent Mozilla IsBad=1 Order allow,deny Allow from all Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Discussion started by: gnurob
1 Replies

2. Shell Programming and Scripting

Perl open(CMD, "cmd |"); buffering problem..

Hello, There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it? open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies

3. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

4. HP-UX

I want a HP-UX ENV,how could I?

just for practice,:) (1 Reply)
Discussion started by: freebsdjlu
1 Replies

5. AIX

CDE Env.

Hi I installed aix 5.2-09 on js21 but am unable to get cde environment through X manager soft. when i run ./rc.dt am able to get the same but this remains till next reboot. What should i do can anybody help me???? (4 Replies)
Discussion started by: vjm
4 Replies

6. UNIX for Dummies Questions & Answers

profile and env

i am new to this and trying to learn unix how can i change my .profile and set ENV variable in .profile to the file name of my environmental file. And how can i create the ENV file. my current .profile is as follows # This is the default standard profile provided to a user. # They are... (3 Replies)
Discussion started by: comwol
3 Replies

7. Shell Programming and Scripting

env

Hi, I want to check the path set for a particular variable.Like when i use "env" command ,so many variables are there.I have to search for that variable which i need.Instead can i have any cmd which i can directly check the path set for that variable except "echo $path_name" Thanks, ... (3 Replies)
Discussion started by: rrs
3 Replies

8. Shell Programming and Scripting

Adding command line env in cron env

Hello friends, i run two scripts manually & they work. i run them in cron & they don work. how to match the two env's 1.command line env 2.cron env i would like cron to use command line env. Thanks & Regards Abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies

9. UNIX for Dummies Questions & Answers

man <cmd> >> cmd.txt

I've noticed most of my postings here are because of syntax errors. So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies

10. Solaris

Env

hey guys!!!! i have a few question .. how to modify the user ENV in Sun Solaris 10 ... Thanks!!!! (1 Reply)
Discussion started by: giancarlodjabon
1 Replies
Login or Register to Ask a Question