Skip to content

Commit b26bc26

Browse files
committed
I created README file
1 parent 21da0bb commit b26bc26

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Remove-Empty-Lines/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# Remove Empty Lines from Text File
3+
4+
This Python script removes empty lines from a text file using command-line arguments.
5+
6+
## Usage
7+
8+
1. Run the script with:
9+
10+
```
11+
python remove_empty_lines.py input_file output_file
12+
```
13+
14+
Replace `input_file` with the input file path and `output_file` with the output file path.
15+
16+
2. The script processes `input_file`, removes empty lines, and saves the result in `output_file`.
17+
18+
## Example
19+
20+
```shell
21+
python remove_empty_lines.py input.txt output.txt
22+
```
23+
24+
This command processes `input.txt` and saves the cleaned content to `output.txt`.
25+
26+
## Error Handling
27+
28+
- Handles incorrect usage with a usage message and exit.
29+
- Gracefully handles file not found errors and other exceptions, providing informative messages.
30+
31+

0 commit comments

Comments
 (0)