LinuxQuestions.org
Visit Jeremy's Blog.
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-01-2011, 02:15 AM   #1
Chipper
LQ Newbie
 
Registered: Feb 2011
Posts: 11

Rep: Reputation: 0
Question patch in .sh file -> error


Hi, I have a script:

`cd $FILEPATH && patch -i $TMPFILEA2$FILETMPPATH`

Variable $FILESPATH is = /tmp/ardiff.AvUUGfOKa2/a/hello/ and Variable $TMPFILEA2$FILETMPPATH is = /tmp/ardiff.AvUUGfOKa2/b/hello/hello.c.patch. I don't know, why is it no working from script file, it write me message to terminal: ./ardiff.sh: line 242: patching: command not found.

But I have no PATCHING command there!!!! The paradox is, when I want to patch it from terminal (I write it to terminal by keyboard, it works!!!). So can someone help me where is the problem?

Thank you very much for answers

Last edited by Chipper; 03-01-2011 at 02:16 AM. Reason: bad word
 
Old 03-01-2011, 02:23 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662
http://linux.die.net/man/1/patch

Quote:
patching: command not found
There is /usr/bin/patch : That's it , no 'patching' !
 
Old 03-01-2011, 02:47 AM   #3
Chipper
LQ Newbie
 
Registered: Feb 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
http://linux.die.net/man/1/patch



There is /usr/bin/patch : That's it , no 'patching' !
Ok thank you, but why it writing this message?
 
Old 03-01-2011, 06:00 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662
Quote:
ardiff.sh: line 242: patching: command not found.
Please look into line 242 in the script "ardiff.sh", to edit the typo(s).
 
Old 03-01-2011, 07:20 AM   #5
Chipper
LQ Newbie
 
Registered: Feb 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
Please look into line 242 in the script "ardiff.sh", to edit the typo(s).
Problem solved, but still i don't know why. I have there:

`cd ${FILEPATH} &&patch -i ${TMPFILEA2}${FILETMPPATH}`

So I removed apostrophes and now, It is working.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
got the error while patching the file using patch command amit_pansuria Linux - General 1 03-08-2010 11:25 AM
patch problem - can't find file to patch jnutt Linux - Kernel 3 02-10-2010 04:45 PM
Patch file? Marty21 Linux - Kernel 2 02-06-2009 04:44 PM
Regarding Patch file yugandhar Linux - Software 1 07-04-2006 08:55 AM
how do i patch a file Hockeyfan Linux - Newbie 1 05-09-2004 04:05 AM


All times are GMT -5. The time now is 03:34 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration