Click here to Skip to main content
16,020,249 members
Home / Discussions / Linux Programming
   

Linux Programming

 
GeneralMessage Closed Pin
27-Oct-22 4:20
Member 1496877127-Oct-22 4:20 
GeneralRe: How to backup Linux OS? Pin
Richard MacCutchan27-Oct-22 4:40
mveRichard MacCutchan27-Oct-22 4:40 
AnswerRe: How to backup Linux OS? Pin
Jeremy Falcon2-Nov-22 13:57
professionalJeremy Falcon2-Nov-22 13:57 
GeneralRe: How to backup Linux OS? Pin
Peter_in_27802-Nov-22 14:10
professionalPeter_in_27802-Nov-22 14:10 
GeneralRe: How to backup Linux OS? Pin
Jeremy Falcon3-Nov-22 8:40
professionalJeremy Falcon3-Nov-22 8:40 
QuestionMessage Closed Pin
24-Oct-22 5:07
Member 1496877124-Oct-22 5:07 
AnswerRe: How to recover - Ubuntu 22.04.1 OS fails to install / activate d bus Pin
Jeremy Falcon2-Nov-22 14:08
professionalJeremy Falcon2-Nov-22 14:08 
Questionexecute multiple commands assigned to a single variable - bash Pin
raphael Oct202216-Oct-22 20:55
raphael Oct202216-Oct-22 20:55 
Hi,

I would like to ask the user to enter a command that will be executed, but I don't understand why I can't assign two commands to the same variable.

Here is the code:

user@localhost:~# read -ep "command: " cmd ; "$cmd"


And result:

command: id ; date
-bash: id ; date : command not found


but if I type a single command, it works.

Thanks for your help
AnswerRe: execute multiple commands assigned to a single variable - bash Pin
k505417-Oct-22 4:38
mvek505417-Oct-22 4:38 
GeneralRe: execute multiple commands assigned to a single variable - bash Pin
Richard MacCutchan17-Oct-22 5:10
mveRichard MacCutchan17-Oct-22 5:10 
QuestionMessage Closed Pin
13-Oct-22 8:04
Member 1496877113-Oct-22 8:04 
AnswerRe: BlueZ / bluetoothctl - where to look for specific ( mouse events? ) source code? Pin
Richard MacCutchan13-Oct-22 22:06
mveRichard MacCutchan13-Oct-22 22:06 
Questionphp that runs on Debian 11 and connects to another machine on the network. Pin
Member 1579676013-Oct-22 4:52
Member 1579676013-Oct-22 4:52 
AnswerRe: php that runs on Debian 11 and connects to another machine on the network. Pin
k505413-Oct-22 5:07
mvek505413-Oct-22 5:07 
GeneralRe: php that runs on Debian 11 and connects to another machine on the network. Pin
Member 1579676013-Oct-22 7:03
Member 1579676013-Oct-22 7:03 
GeneralRe: php that runs on Debian 11 and connects to another machine on the network. Pin
k505413-Oct-22 7:35
mvek505413-Oct-22 7:35 
GeneralRe: php that runs on Debian 11 and connects to another machine on the network. Pin
Member 1579676014-Oct-22 1:53
Member 1579676014-Oct-22 1:53 
QuestionMessage Closed Pin
6-Oct-22 7:31
Member 149687716-Oct-22 7:31 
AnswerRe: Removing unneeded OS partitions Pin
Jeremy Falcon2-Nov-22 14:10
professionalJeremy Falcon2-Nov-22 14:10 
Questiongrub-rescue flashes then grub menu Pin
tumuxoyu5-Jul-22 23:52
tumuxoyu5-Jul-22 23:52 
QuestionBasic on shell ,Git and vagrant Pin
Ezikiel Odutola22-Jun-22 22:24
Ezikiel Odutola22-Jun-22 22:24 
AnswerRe: Basic on shell ,Git and vagrant Pin
Richard Deeming22-Jun-22 23:57
mveRichard Deeming22-Jun-22 23:57 
QuestionMessage Closed Pin
26-May-22 5:35
Member 1496877126-May-22 5:35 
AnswerRe: Mutiboot grub - run last OS option - all Linux Pin
Richard MacCutchan26-May-22 21:46
mveRichard MacCutchan26-May-22 21:46 
GeneralMessage Closed Pin
27-May-22 6:50
Member 1496877127-May-22 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.