Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
1 answer
101 views

Recursively Copy Dotfiles from Git Repo to New System's Home Directory

I manage my dotfiles in a github repo. The idea would be that I could clone the repo if I ever have to develop on a new system and symlink them to the home ...
Jordan Mandel's user avatar
2 votes
0 answers
60 views

Outputting a standalone shell script from arguments

I am solving an exercise. Essentially, it's a shell script that takes in file and/or directory arguments and outputs another (standalone) shell script that outputs these files, including any directory ...
Elena Andreea Abig's user avatar
2 votes
1 answer
75 views

Making a disk usage breakdown

I'm looking for a better way of doing this code I made. I work for tech support and one of the biggest questions I am asked is: "Hey, how did my disk get so full in my VPS?" I am aiming for output ...
Charles Wilson's user avatar
3 votes
2 answers
908 views

Run 'N' Number of PHP Scripts on shell forever in a loop

My objective is to run some 'N' number of PHP Scripts in cron. Since these are web scrapers coded in PHP and hits database on my server, each script runs for like 1 hour and they take a lot of CPU ...
Tushar Kesarwani's user avatar
3 votes
1 answer
839 views

Bash script to deploy a mongodb cluster on local machine

I recently wrote a small script to deploy a mongodb cluster on a single machine. The cluster is composed of : 3 configurations server that holds the same informations (they are replicas ) 2 shard ...
felix's user avatar
  • 608
1 vote
1 answer
2k views

Java executing rSync shell command with progress display

I basically want to write a simple GUI program to sync to directories using the rsync command. The core part of the code is below. My main question is, do I need to ...
user avatar
3 votes
1 answer
921 views

Shell script to archive files to AWS S3

This is a simple script that moves files to S3 if they are > 14 days old. It ignores files that are < 14 days old. If the file is successfully synced to AWS S3 then we can remove it from the server....
kafka's user avatar
  • 436
2 votes
1 answer
75 views

Shell command for the normal program termination of Skype from the command line

Would the following be the right way to do it in your opinion? Can you suggest a better alternative or, if not, is there something that can be done to make the existing version better? ...
misha's user avatar
  • 297
2 votes
1 answer
182 views

C main function for POSIX shell

I got a pretty large main function that I want to break up in smaller helper functions. Can you help me suggest what to break out into helper functions? The ...
Niklas Rosencrantz's user avatar
1 vote
1 answer
81 views

Handle builtin commands

I've written a small C function to handle the builtin commands of a custom shell that I'm writing in C. Is it better to use a switch instead? ...
Niklas Rosencrantz's user avatar
3 votes
1 answer
137 views

Display the last N lines of a text file with line numbers in reverse order

Do you think the way I'm doing it is fine? Is this the most typical way to do it? Share your thoughts please. ...
misha's user avatar
  • 297
5 votes
1 answer
6k views

FFmpeg command line for showing two videos side by side

Here is command line for playing two videos side by side in sync in FFmpeg (ffplay). It can be useful for comaring videos, for example. ...
Vi.'s user avatar
  • 309
2 votes
2 answers
141 views

Split redirecting to multiple files in bash

A function mycommand which runs command and: Gives me three log-files which are: *.stdout.log: everything from ...
ElleJay's user avatar
  • 919
1 vote
1 answer
112 views

Unix shell script with master and source files

I have a script which is having too many modules. The script is working perfectly, but the only issue is it is taking too much time and I need to reduce the complexity of the script. I have a source ...
Tushar Kesarwani's user avatar
5 votes
1 answer
1k views

Bash Music Player

I have finally finished creating my first real project. It's just a simple music player that can provides the user with the latest music from any site (as long as it contains MP3 files) he provides ...
Amr Ayman's user avatar
  • 853

15 30 50 per page