LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2013, 03:38 PM   #1
reza_zah1991
Member
 
Registered: Mar 2013
Location: Qom , Iran
Distribution: opensuse,lubuntu
Posts: 32

Rep: Reputation: Disabled
Thumbs down read command problem


hi folks,,
i written a project for my Network University Course,,
there is 2 machine,,(A & B)
1-machine A send a "files" DIR File List to machine B & Machine B send a file name (from DIR List that it get) to Machine A & Machine A send the File to Machine B,,
after that,,Machine B change the Content of File & Send it back & A replaced That,,

2-at last,,I want to get a command from B And Send it to A,,
A execute that (like ls) & return the Result to B,,
That's Just it

it response for job 1 but
i put the "read -p "Enter Your Command :" commands" in file bmachineB.sh,,(for jub 2)
But it didn't work & unbelievably bash did't read & execute that line & just skip that while i use read command before this line & it just worked,,

I upload the 2 Machine Shell File,,
you Can Download that Below the Code
& this is DIR `ls -lR`:

Code:
netWorkProject/:
total 8
drwxrwxr-x 3 reza reza 4096 دسامب 10 01:03 A
drwxrwxr-x 2 reza reza 4096 دسامب 10 01:03 B

new/A:
total 8
-rwxrwxr-x 1 reza reza 1619 دسامب  6 21:31 amachnieA.txt
drwxrwxr-x 2 reza reza 4096 دسامب 10 01:02 files

new/A/files:
total 16
-rw-rw-r-- 1 reza reza    1 دسامب 10 00:29 first.txt
-rw-rw-r-- 1 reza reza 1459 دسامب  9 09:38 forth.txt
-rw-rw-r-- 1 reza reza 1459 دسامب  9 18:40 second.txt
-rw-rw-r-- 1 reza reza 1459 دسامب  9 09:02 third.txt

new/B:
total 4
-rwxrwxr-x 1 reza reza 1806 دسامب 10 00:33 bmachineB.txt
tnx to every one Can Guide me,,
Attached Files
File Type: txt amachnieA.txt (1.6 KB, 21 views)
File Type: txt bmachineB.txt (1.8 KB, 11 views)
 
  


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
"short read (fsck)" on disc access (failed command: READ FPDMA QUEUED) estellnb Linux - Hardware 3 02-22-2012 05:27 PM
Read Command balakrishnay Linux - General 1 01-30-2010 04:41 AM
Problem in read a text file and display in DOS command... steve2688 Programming 7 06-17-2009 03:04 AM
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 05:21 AM
Read command. unreal128 Linux - Software 2 09-30-2005 12:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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