LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2009, 12:31 PM   #1
Amaranthus
LQ Newbie
 
Registered: Dec 2009
Location: Budapest, Hungary
Distribution: MEPIS MX14
Posts: 19

Rep: Reputation: 0
-sh: ./t: Text file busy


Hi,
I tried to create a 'hello world' type shell script:

cat >t
#!/bin/sh
echo Hello world
^z

Then I issued:
chmod 755 t

ls -l t result:
-rwxr-xr-x 1 root root 20 jan 1 01:25 t

./t results the subject of the thread

operating system is
OpenWrt on ADM5120 embedded controller

I tried the same on Slackware 13 with almost the same result except that the message said:
bad interpreter: text file busy
I checked the SHELL variable by issuing a set command and the value of the SHELL variable is the same as I specified in the script.
(/bin/sh on the Adm5120 system )

Google-ing the error message did not result relevant information. I suppose a linux guru simply points out my mistake.
 
Old 12-12-2009, 12:38 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
To terminate the standard input you have to use Ctrl-D, not Ctrl-Z. With Ctrl-Z the job has been stopped and the text file is busy as stated by the error message in slackware. To recover the stopped job, use the command
Code:
fg
(as is without arguments) then either continue to write the content of the file or just terminate using Ctrl-D. After that the script will be runnable.
 
Old 12-12-2009, 12:57 PM   #3
Amaranthus
LQ Newbie
 
Registered: Dec 2009
Location: Budapest, Hungary
Distribution: MEPIS MX14
Posts: 19

Original Poster
Rep: Reputation: 0
Thank you very much for your quick help!
Unfortunately my small system doesn't have even vi :-(
Using ^Z was a piece of the ruins of my 20 year old DOS practice and seemed work...
Thank you again!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot create regular file ...: text file busy laode Linux - General 4 11-27-2012 02:56 AM
scp text file busy error seran Linux - General 3 03-24-2010 10:21 AM
Running make menuconfig results in text file is busy. jerel4565 Linux - Kernel 2 07-18-2009 11:40 PM
Text file Busy yusufs Linux - Newbie 7 01-05-2008 07:12 AM
/etc/rc.sysinit: /bin/awk: Text file busy teeno Linux - Software 5 02-23-2005 03:19 AM


All times are GMT -5. The time now is 11:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration