LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2013, 12:03 PM   #1
Predatorian
Member
 
Registered: Mar 2008
Location: currently, where ever the army takes me
Distribution: Debian Lenny/Ubuntu or Arch Linux
Posts: 145

Rep: Reputation: 28
PuTTY Command Sender changing +x to X


Hello all,

Am using PuTTY command sender to send a script that downloads files from a http share and is supposed to chmod one of hte files with a "+x" attribute, but when I do that, it changes the "+x to "X" and then returns and error. BUT when I send the commands normally through PuTTYCS not in a script the command works, otherwise i have to paste it into each terminal session.

Am I saving the files wrong, with the wrong encoding? I have it set to save the file as a UNIX file instead of a DOS/Windows File, and also set to ANSI encoding.

I am trying to run these commands on a RHEL 5.3 system. I am running PuTTY Command Sender 1.81 and Windows 7.

The code being ran by the PuTTY Command Sender script:
Code:
chmod +x /tmp/linux-zabbix-agent/zabbix_linux_install.sh 
/tmp/linux-zabbix-agent/zabbix_linux_install.sh  
ps -e | grep zabbix
Error output:
Code:
chmod X /tmp/linux-zabbix-agent/zabbix_linux_install.sh
chmod: invalid mode: `X'
Try `chmod --help' for more information.
 
Old 03-21-2013, 05:01 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Look at PuttyCS Script SendKeys Syntax "+" means press a SHIFT key, so for "+x" in script you get capital "X". You need to change all "+" occurrences to "{PLUS}" tags.
 
Old 03-21-2013, 02:21 PM   #3
Predatorian
Member
 
Registered: Mar 2008
Location: currently, where ever the army takes me
Distribution: Debian Lenny/Ubuntu or Arch Linux
Posts: 145

Original Poster
Rep: Reputation: 28
Once I get back to my office I will try this out. You're probably right, but still got to test it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail takes a pause after Mail From command for a unresolvable sender. lancia Linux - Newbie 2 08-27-2012 02:00 AM
550 Sender verify failed (in reply to RCPT TO command) Brandon.Wamboldt Linux - Server 3 05-31-2009 10:35 AM
Command line pop3/gmail email sender Maverick1182 Linux - Newbie 2 03-02-2008 01:08 AM
Option to specify Sender's Address in Mail command crazy_girl Linux - Newbie 2 08-20-2007 10:36 AM
Command for downloading using Putty michn77 Linux - General 2 01-13-2004 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration