Tagged Questions
0
votes
0answers
30 views
Directory's disk usage list
For my classes i had to finish this task.
Problem 5.5 Directory's disk usage list
For indicated directory print a list of files and subdirectories in descending order according to their total disk ...
2
votes
1answer
48 views
Simple IPSec/tunnel setup script
I've developed a script to set up an encrypted tunnel between two Linux hosts, using iproute2, ssh and setkey.
The goal is to allow setting up ad-hoc secure tunnels with minimum of setup and ...
1
vote
1answer
33 views
Bash script to manage multiple Java Development Kits installations
I'm writing a bash script to manage multiple JDKs, the script is very simple, you have to choose a directory when you store all the jdk's, and the script maintain a symlink to the current jdk'. ...
1
vote
2answers
60 views
Bash script that can uncompress: tar, gzip, rar
This code generally works exactly as it is supposed to. I'm learning bash I'm looking for some constructive help that could help me improve my work.
#!/bin/bash
usage()
{
echo "Program for ...
-1
votes
1answer
24 views
bash file manipulation [closed]
I have files in a directory named so:
1welcome.avi
2introdution.avi
I have a rhcsa.txt file that has what these files should be named as:
rhcsa_1_welcome.avi
rhcsa_2_introduction.avi
both the ...
2
votes
2answers
93 views
Need some advice and feedback on my C code calling Bash functions
My intent is to use Bash functions defined in functions.sh in a C program. I am doing this so that I don't have to rewrite the Bash functionality again in C. I want to use one common library for ...
5
votes
3answers
81 views
Can I speed up this simple versioning/backup script?
I'm writing a simple automatic backup/versioning bash script.
It should basically mirror a directory structure somewhere, and then copy files over there when they've been altered. The ghost files ...
1
vote
3answers
894 views
Bash script to swap out, edit host files
So this is my first useful bash script. It's meant to make it easy to switch between a "work" hosts file (that blocks sites like reddit.com, youtube.com, etc.) and my normal hosts file, and also to ...
2
votes
2answers
82 views
How to improve the way I handle greping in this script
What my script does is:
Append data to a file on a continuous basis.
If an error pattern is observed, then do something.
I need feedback on the way I am grepping for patterns in the continuously ...
4
votes
2answers
208 views
Suggestions needed to improve my code ( bash script)
I wrote a bash script to print contents of files in a given directory in a loop. I kindly need suggestions mainly on the following aspect:
How can I improve command line parameters handling to the ...