Alright I am writing a shell script to open Irssi and then automatically connect to freenode. Should I edit the file at ~/.irssi/config or is there a way to simulate me typing /connect irc.freenode.net? I have used echo, send, and expect but it hasn't worked. Here is the code I have so far.irssiecho /connect irc.freenode.net
Use Bash for Irssi
bash;irssi
irssi provides a -c switch which allows you to specify a server to connect to when the application starts. From irssi's man page:-c, --connect=SERVER    connects to SERVERSo, you could just use either one of these:$ irssi -c irc.freenode.net$ irssi --connect=irc.freenode.net$ irssi --connect irc.freenode.netThe reason why echo does not work is because it is not connected to irssi's standard input. Basically, what happens is:You start irssi, connect to a server, have a little chat, leave.Once irssi is closed (its process terminates), then your echo text will be printed.You will have the same result if you use:$ irssi ; echo HelloNow, as far as expect is concerned, this is probably due to the fact that irssi is a ncurses-based client. Since ncurses redefines the way input and output are manipulated, it is very likely that expect cannot communicate with the process anyway. Additionally, there is nothing to expect on stdout specifically, since irssi sends many things on that stream:A blue header.A few blank lines, some with text if you used -c (connection log).Another blue line with some text in it.A prompt....And not just:[(status)] _To which you could respond with:/connect irc.freenode.net