LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-02-2025, 07:04 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,558

Rep: Reputation: 104Reputation: 104
Question Inner: command not found. Why isn't that command working ?


Hi,

Code:
bash-5.1$ $(sleep 2; ls)&
[1] 1251
bash-5.1$ bash: Inner: command not found
So sleep works, but not the ls.
I think I used this syntax in the past, and it worked.

Last edited by Linux.tar.gz; 08-02-2025 at 08:39 AM.
 
Old 08-02-2025, 07:24 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,818
Blog Entries: 7

Rep: Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189
Take the parentheses away.
Code:
sleep 2; ls
ls is a binary file.
Code:
$(bash ls)
/usr/bin/ls: /usr/bin/ls: cannot execute binary file
What are you trying to accomplish?
Sleep 2, then ls in the background?

Code:
{ sleep 2; ls; } &

(sleep 2) && (ls &)
 
1 members found this post helpful.
Old 08-02-2025, 08:04 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,558

Original Poster
Rep: Reputation: 104Reputation: 104
Delay the ls command in a detached process.
 
Old 08-02-2025, 08:26 AM   #4
clueless_dolt
Member
 
Registered: Jun 2025
Distribution: Slackware64 Current
Posts: 227

Rep: Reputation: 67
Quote:
Originally Posted by Linux.tar.gz View Post
Delay the ls command in a detached process.
Code:
$(ls)
puts the result of ls into a pseudo variable (I'm not using the real terminology here cause I don't know it, but I know what happens)
So you can use it with a command

Code:
echo $(which uname)
Or put it as a value into a 'real' variable.

Code:
my_uname=$(which uname)
echo $my_uname
Which you're not doing.

So it just tries to run whatever ls spits out (until a line break or some argument delimiter) as a command.
So maybe one of the files in the directory you're running your command is called "Inner Tube In Pool" and because whitespace is an argument delimiter, that is being evaluated.

It runs ls, saves the result of ls into a pseudo variable, but that pseude variable is not put anywhere, neither as an argument for another command like "echo $(ls)" or as a value for a 'real' variable.
So it's executed as a command, but your filename starts with Inner and then a whitespace, so it stops there and you get your mess.

If you want to delay ls in a subshell, which a set of ()s create (note the lack of dollar sign at the front) AND as a background:

Then it's something like
Code:
sleep 3 && (ls)&
I don't see any practical use of that though, so maybe you should be asking something else, like...how to solve whatever task you want solved BEFORE arriving at this kind of solution for it.

Cause that solution is weird. Makes me think that your problem is weird somewhere, try to redesign the problem to make it less weird, if you can.

Last edited by clueless_dolt; 08-02-2025 at 08:27 AM.
 
1 members found this post helpful.
Old 08-02-2025, 08:37 AM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,558

Original Poster
Rep: Reputation: 104Reputation: 104
Thanks for your explanations.
I wasn't running "ls" before, that's probably why this syntax worked for my previous case.
Currently it was just a test out of curiosity.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] vim yank inner command not working noob555 Linux - Newbie 4 05-06-2022 09:46 PM
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
LXer: Using the /proc Filesystem to Examine Your Linux Inner Working LXer Syndicated Linux News 0 08-19-2010 03:30 PM
Java: what's the difference between an inner class and a static inner class? irey Programming 6 01-28-2009 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:08 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
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