Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/radeelahmad/bash-chat
The Simple Chat Application enables real-time communication between two users over a network using a client-server architecture
https://github.com/radeelahmad/bash-chat
bash-script chat chat-app project
Last synced: 2 days ago
JSON representation
The Simple Chat Application enables real-time communication between two users over a network using a client-server architecture
- Host: GitHub
- URL: https://github.com/radeelahmad/bash-chat
- Owner: RadeelAhmad
- Created: 2024-07-14T13:45:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-14T14:09:31.000Z (4 months ago)
- Last Synced: 2024-07-15T15:33:11.989Z (4 months ago)
- Topics: bash-script, chat, chat-app, project
- Language: Shell
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bash-Chat
This repository contains a simple chat application implemented in Bash using netcat. The application consists of two scripts: client and server.## Requirements
- Bash
- netcat (nc)## Files
- **client:** Script to connect to the chat server.
- **server:** Script to host the chat server.# Usage
## Server
To start the server, run the `server` script. You can optionally specify a port number as an argument. If no port is provided, the default port `9999` will be used.```console
chmod +x server.sh
./server [port]
```## Example:
```console
chmod +x server.sh
./server 8888
```
After starting the server, it will prompt for a username. Enter your desired username to start the chat server. The server will then wait for a client to join.## Client
To connect to the chat server, run the client script. It will prompt you to enter the hostname or IP address of the server and the port number.```console
chmod +x client.sh
./client
```
## Example:```yaml
Enter the hostname or IP address: 127.0.0.1
Enter the port number: 8888
```
After entering the details, the client will connect to the server and you can start chatting.## Features
- Ascii art displayed on both server and client startup.
- Real-time messaging between server and client.
- Color-coded messages for easier readability.## Example
**Server Output**
```yaml
▄▄▄▄ ▄▄▄ ██████ ██░ ██ ▄████▄ ██░ ██ ▄▄▄ ▄▄▄█████▓
▓█████▄ ▒████▄ ▒██ ▒ ▓██░ ██▒ ▒██▀ ▀█ ▓██░ ██▒▒████▄ ▓ ██▒ ▓▒
▒██▒ ▄██▒██ ▀█▄ ░ ▓██▄ ▒██▀▀██░ ▒▓█ ▄ ▒██▀▀██░▒██ ▀█▄ ▒ ▓██░ ▒░
▒██░█▀ ░██▄▄▄▄██ ▒ ██▒░▓█ ░██ ▒▓▓▄ ▄██▒░▓█ ░██ ░██▄▄▄▄██░ ▓██▓ ░
░▓█ ▀█▓ ▓█ ▓██▒▒██████▒▒░▓█▒░██▓ ▒ ▓███▀ ░░▓█▒░██▓ ▓█ ▓██▒ ▒██▒ ░
░▒▓███▀▒ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒ ░ ░▒ ▒ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░ ▒ ░░
▒░▒ ░ ▒ ▒▒ ░░ ░▒ ░ ░ ▒ ░▒░ ░ ░ ▒ ▒ ░▒░ ░ ▒ ▒▒ ░ ░
░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░ ░ ░ ░░ ░ ░ ▒ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░
Enter username: host
Starting on port 8888
Waiting for client to join...
```---
**Client Output**
```yaml
▄▄▄▄ ▄▄▄ ██████ ██░ ██ ▄████▄ ██░ ██ ▄▄▄ ▄▄▄█████▓
▓█████▄ ▒████▄ ▒██ ▒ ▓██░ ██▒ ▒██▀ ▀█ ▓██░ ██▒▒████▄ ▓ ██▒ ▓▒
▒██▒ ▄██▒██ ▀█▄ ░ ▓██▄ ▒██▀▀██░ ▒▓█ ▄ ▒██▀▀██░▒██ ▀█▄ ▒ ▓██░ ▒░
▒██░█▀ ░██▄▄▄▄██ ▒ ██▒░▓█ ░██ ▒▓▓▄ ▄██▒░▓█ ░██ ░██▄▄▄▄██░ ▓██▓ ░
░▓█ ▀█▓ ▓█ ▓██▒▒██████▒▒░▓█▒░██▓ ▒ ▓███▀ ░░▓█▒░██▓ ▓█ ▓██▒ ▒██▒ ░
░▒▓███▀▒ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒ ░ ░▒ ▒ ░ ▒ ░░▒░▒ ▒▒ ▓▒█░ ▒ ░░
▒░▒ ░ ▒ ▒▒ ░░ ░▒ ░ ░ ▒ ░▒░ ░ ░ ▒ ▒ ░▒░ ░ ▒ ▒▒ ░ ░
░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░ ░ ░ ░░ ░ ░ ▒ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░
Enter the hostname or IP address: 127.0.0.1
Enter the port number: 8888
Enter username: client
```