LinuxQuestions.org
Help answer threads with 0 replies.
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, 01: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 01:16 AM. Reason: bad word
 
Old 03-01-2011, 01:23 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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, 01: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, 05:00 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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, 06: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 10:25 AM
patch problem - can't find file to patch jnutt Linux - Kernel 3 02-10-2010 03:45 PM
Patch file? Marty21 Linux - Kernel 2 02-06-2009 03:44 PM
Regarding Patch file yugandhar Linux - Software 1 07-04-2006 07:55 AM
how do i patch a file Hockeyfan Linux - Newbie 1 05-09-2004 03:05 AM

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

All times are GMT -5. The time now is 06:01 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