Sponsored Content
Operating Systems Linux How do I capture responses from the chat command? Post 302494389 by Bashingaway on Monday 7th of February 2011 06:26:54 AM
Old 02-07-2011
How do I capture responses from the chat command?

Unfortunately googling the word 'chat' gives you zebedee billion responses that relate to everything and few of them refer to the linux chat command. I've read the man page and found a couple of examples but can't see how to do this.

I want to query the modem for it's manufacturer, product id and firmware version using AT commands. I can get the modem to respond as expected to the commands if initiated using chat, however I can't see how to get the response into a bash variable for me to work on it.

for example

Code:
chat -V -s '' 'AT+CGMI' 'OK' '' > $COMPORT < $COMPORT

gives me the onscreen response I am looking for, however using a RESPONSEVALUE=`chat....` just gives me an empty variable.

Any ideas anyone?
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

talk command to chat

Hi, Could you please advice on the following query: There are 2 users on a unix box: 1. aaaa 2. bbbb I open 2 putty sessions and login with the above 2 users. Then I type the following using the aaaa user to chat with bbbb. talk bbbb or talk bbbb@hostname Result: the screen goes... (1 Reply)
Discussion started by: miltonkeynesguy
1 Replies

2. UNIX for Dummies Questions & Answers

talk command to chat

Hi, Could you please advice on the following query: There are 2 users on a unix box: 1. aaaa 2. bbbb I open 2 putty sessions and login with the above 2 users. Then I type the following using the aaaa user to chat with bbbb. talk bbbb or talk bbbb@hostname Result: the screen goes... (4 Replies)
Discussion started by: miltonkeynesguy
4 Replies

3. UNIX for Dummies Questions & Answers

Doing a capture while another command is executing?

Basically what i'm trying to do is execute an update command and at the same time have the system do a TCPdump to file for that update traffic. So I would like to connect the two commands so that the tcpdump terminates automatically when the update finishes/fails/whatever. Right now I have... (0 Replies)
Discussion started by: MrEddy
0 Replies

4. Web Development

Can you embed Skype or any other video chat/chat program into a webpage?

Hi, I am trying to embed Skype or any other video chat/chat program into a webpage. Has anyone had success doing this? or know how? Thanks Phil (2 Replies)
Discussion started by: phil_heath
2 Replies

5. What is on Your Mind?

Very Funny and Somewhat Amazing 2006 Chat Bot Chat

Working on the badging system, Just found this old thread for 2006 and started reading it. ROTFL ... what a great discussion between forum members and our chat bot Gollum "back in the good old days"... You must check this out if you want a laugh and big smile: ... (1 Reply)
Discussion started by: Neo
1 Replies
eiskaltdcpp-qt(1)					      General Commands Manual						 eiskaltdcpp-qt(1)

NAME
EiskaltDC++_Qt - GUI based on Qt SYNOPSIS
eiskaltdcpp-qt <magnet link> <dchub://link> <adc(s)://link> eiskaltdcpp-qt <Key> DESCRIPTION
EiskaltDC++ is a cross-platform program that uses the Direct Connect and ADC protocol. It is compatible with other DC clients, such as the original DC from Neomodus, DC++ and derivatives. EiskaltDC++ also interoperates with all common DC hub software. COMMAND LINE OPTIONS
A summary of options is included below. -h, --help display help and exit -V, --version output version information and exit KEYBOARD SHORTCUTS
These are default keyboard shortcuts. You can change them in Preferences dialog (Shorcuts tab). Ctrl+O Open options window Ctrl+L Open own filelist Ctrl+E Refresh share Ctrl+R Reconnect to hub Ctrl+N Quick connect Ctrl+H Favourite hubs Ctrl+P Public hubs Ctrl+U Favourite users Ctrl+T Show/hide transfers widget Ctrl+D Show/hide downloads queue widget Ctrl+S Open search widget Ctrl+F Show/hide find or filter frame Ctrl+A Select all Ctrl+W Close current widget Ctrl+M Show/hide main menu Ctrl+PageUp Switch to the previous widget. Available only if widget panel is used, not working in mode of sidebar. Ctrl+PageDown Switch to the next widget. Available only if widget panel is used, not working in mode of sidebar. Ctrl+Up Switch to the previous string from history of sent messages in chat for current session. Available only when input frame is focused on. Ctrl+Down Switch to the next string from history of sent messages in chat for current session. Available only when input frame is focused on. Ctrl++ Zoom in text in the chat Ctrl+- Zoom out text in the chat Ctrl+Mousewheel Change font size in the chat Alt+<0-9> Go to one of the first ten widgets. Available only if widget panel is used, not working in mode of sidebar. Esc Hide find or filter frame. Also it close dialog window. Otherwise hide main window in tray (if tray icon is enabled) Del Delete selected items. Now available in Download Queue widget. CHAT COMMANDS
/aspell on/off - enable/disable spell checking (only if program was build with aspell support) /alias <ALIAS_NAME>::<COMMAND> - make alias /ALIAS_NAME to /COMMAND For example, command /alias amarok::/sh /usr/share/eiskaltdcpp/examples/amr.en_US.sh will create alias /amarok /alias purge <ALIAS_NAME> - remove alias /alias list - list all aliases /away <message> - set away-mode on/off /back - set away-mode off /browse <nick> - browse user files /clear - clear chat window /kword add <keyword> - add user-defined keyword which will be highlighted in the chat /kword purge <keyword> - remove user-defined keyword /kword list - full list of keywords which will be highlighted in the chat /magnet - default action with magnet (0-ask, 1-search, 2-download) /close - close this hub /fav - add this hub to favorites /grant <nick> - grant extra slot to user /help, /?, /h - show help /info <nick> - show info about user /ratio [show] - show ratio [send in chat] /me - say a third person /pm <nick> - begin private chat with user /sh <command> - start command and redirect output to the chat /luafile <file> - load Lua file /lua <chunk> - execute Lua Chunk /ws <option> [value] - edit config (~/.config/eiskaltdc++/EiskaltDC++_Qt.conf), also you can edit it manually For example: /ws chat-dbl-click-action <0-2> (double click) /ws chat-mdl-click-action <0-2> (middle click) (0 - insert nick into input widget, 1 - get file list, 2 - private message) /ws app-unit-base <1024 or 1000> (show kibibyte (KiB) or kilobyte (KB), etc.) /ws chat-timestamp <hh:mm:ss, hh:mm, hh and etc.> (set chat timestamp) /ws hubframe/chat-background-color <color> (set background color in the chat, where <color> is in HTML format) /ws hubframe/unreaden-draw-line <0-1> (0 - switch off, 1 - switch on) /ws hubframe/redirect-pm-to-main-chat <0-1> (see above) FILES
/usr/share/eiskaltdcpp/qt Directory with some resource files ~/.config/eiskaltdc++/ or $XDG_CONFIG_HOME/eiskaltdc++/ Directory with configuration files /usr/share/eiskaltdcpp/examples Directory with examples of custom scripts (see /sh chat command) AUTHOR
This program was written by Andrey Karlov <dein.negativ@gmail.com> and others (see file AUTHORS). EiskaltDC++ homepage: http://code.google.com/p/eiskaltdc/ BUG REPORTS
If you find a bug in EiskaltDC++ please report it here: http://code.google.com/p/eiskaltdc/issues/list This manual page was written by Boris Pek <tehnick-8@mail.ru> for the Debian project (and may be used by others). 19 Feb 2012 eiskaltdcpp-qt(1)
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy