Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
73 views

Bash script to share snippets of code using rsync

I just got through writing a bash script so my friend and I can share snippets of code to a central file via rsync and ssh. What it does is this; Sets up ssh public key auth if not already working. ...
1
vote
3answers
149 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 ...
4
votes
2answers
112 views

Bash script to send to recycle bin or trash

This is a script that emulates a recycle bin in the CLI. You can undo your last changes and delete files This is my first bash script so don't hesitate to bash me. Thank you for taking a look. #! ...
2
votes
1answer
98 views

Shell script that creates and deletes symbolic links

Right now I am working on an install and uninstall script for my vim configuration files. The install script links files and directories and the uninstall script deletes those links. I just want to ...
2
votes
1answer
67 views

optimizing a bash script chain - speed suggestions?

i am testing an application that i wrote and want to test the solution my algorithm produces to a Monte carlo solution. I use the harddisk a lot and i was wondering if there was a solution that uses ...
0
votes
1answer
75 views

Problem with writing “Bash Script” [closed]

Please help me. I have a problem with writing "Bash Script". I just began to study "bash scripts", so I need help. Could someone write to me some "bash scripts"? I'll be very grateful.
1
vote
2answers
90 views

Script to group files by extension and unzip archives

I am writing a shell script to sort my files by extension and unzip archives. It works in simple cases, but I haven't tested it extensively. How can I make it more robust against the set of file names ...
5
votes
3answers
125 views

Script to monitor a folder and compress the content

We have a Debian Squeeze server where we upload files through SFTP, and I wrote this script to automatically compress uploaded files. The script is scheduled through a cron job in an unprivileged ...
2
votes
2answers
69 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 ...
3
votes
2answers
152 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 ...
5
votes
4answers
145 views

How can I simplify these bash if statements before it gets out of hand?

We have a setup script for setting up a development environment, and setting up the image libraries is getting a bit messy: # this is to get PNG and JPEG support working in PIL on Ubuntu if [ -d ...
1
vote
1answer
79 views

CommonJS modules/require at build-time with bash and M4

I've implemented CommonJS Modules 1.1.1 as a simple bash script with a bit of help from M4. I'm interested in comments on the shell scripting and the javascript output. Some specific questions on ...
0
votes
0answers
43 views

Can you help me troubleshoot this code? [closed]

I am working with this bash script but get unexpected results: #!/bin/bash trap 'get_window_size' WINCH # trap when a user has resized the window _UNDERLINE_ON=`tput smul` ...
1
vote
3answers
72 views

Counting last reported version in shell

Struggling to write a simple tool to quickly sum up the last reported versions in a bunch of files. I'm using a named pipe to get the count out the loop for the final value, but the $version isn't ...
2
votes
2answers
73 views

Shell script: is it doing what I think it's doing

I've not written many shell scripts and cobbled this together from examples. The 'if' condition should check if this is already running and quite if so. The 'wget' call should trigger the php page and ...

1 2
15 30 50 per page