Sponsored Content
Top Forums Shell Programming and Scripting 100 interesting shell scripting problems Post 302849409 by nickednamed on Sunday 1st of September 2013 09:57:27 AM
Old 09-01-2013
100 interesting shell scripting problems

Hi all,

I'm just learning to write shell scripts (new to the whole UNIX thing) and I'm wondering if anyone would like to help me create a resource to help me, and others like me, learn scripting. It would be something like "100 interesting shell scripting problems".

All I need are suggestions for interesting problems to solve using shell scripting.

My motivation / reasoning is this: I've been learning for a while, but as I'm doing it for pleasure (not for work), I don't really need to write a lot of shell scripts. I've already written a few simple scripts to automate some of my daily tasks, but I want to take my scripting to the next level.

I've got a lot of great books, tutorials, web pages, etc. to help me learn, but they are mostly used for reference, as the examples they include are rather general / trivial, and they don't have many exercises.

Basically, I have a lack of "interesting problems to solve" and therefore a lack of real learning opportunities and practice. I know that others have the same problem too.

So, I'm looking to create a list of practical, interesting, real-world problems which gradually increase in difficulty. It will be similar to thekarangoel's git repo "Projects" where you can learn Python by solving the problems given (sorry, can't post links yet).

As an example, in case I'm not making myself clear, there could be a list of categories, such as:
- Account Admin
- Backup
- Games
- Networking
- File manipulation
- etc.

Each category would contain a number of problems to solve. Some (rubbish) examples might be:
- Create a script which counts the number of users currently logged in.
- Create a script which backs up all the dotfiles for the current user.
- Create a script which converts all file names to lowercase and removes whitespaces.
- Create a script which converts Markdown formatted text into HTML files.

It will be a kind of learn-by-doing system. The learner will be responsible for finding the information and resources necessary to solve the problem, and may upload his solution for others to study. The problems could include difficulty ratings, hints / tips, suggestions or links to solutions or helpful resources to aid the learner, if need be.

I would make the resource available online as a webpage, wiki, git repo, ebook, or whatever else people want.

As I said, I'm happy to do the heavy lifting myself, but lack of knowledge / experience stops me from creating meaningful problems, or even decent categories of problems / tasks.

Any feedback, help or suggestions would be very much appreciated, but as stated at the beginning all I need to get started are suggestions for interesting problems to solve using shell scripting.

Thank you,

Nickednamed

Last edited by nickednamed; 09-01-2013 at 03:35 PM.. Reason: Grammar, style
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripting file permission problems...

Hello all - I have two systems. 1) Linux box running Redhat 8.0 2) Tru64 box running V4.0f From the Linux box I am remotely mounting a directory (nfs mount) that resides on the Tru64 machine. The directory that is nfs mounted contains two subdirectories: my_dir1 my_dir2 I want... (3 Replies)
Discussion started by: Heron
3 Replies

2. Shell Programming and Scripting

Scripting problems

Hello, Im trying to write a script where it will only execute on a certain day. What would the script look like? if then do this is this correct?? (13 Replies)
Discussion started by: lewisoco
13 Replies

3. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

4. Shell Programming and Scripting

shell scripting on unix/mysql problems

Hi, I have written a shell script for oracle on unix that does a df for specific files, and then will display the size, Avail, % used and the difference from yesterday to today. I have been asked to place it on some MySql databases that run onn unix and linux also, but when I try to run them I... (2 Replies)
Discussion started by: cat55
2 Replies

5. Shell Programming and Scripting

Beginner bash scripting - a few problems

Hey Guys, I am creating a bash script on my freeBSD box, the script should basically ask the user to enter a username and domain. The script will take this information and basically append alot of information to config files so the user can receive email from that domain and create a web site at... (1 Reply)
Discussion started by: traxy
1 Replies

6. Shell Programming and Scripting

Shell scripting problems - Commands not on local machine

Hello all- I have done a lot of searching tonight, but all leads seem to be dead ends. Forgive me if this has been covered, but I've searched the forum and the internet. I am having trouble building a shell script which uses SSH to login to our schools 1024 cluster grid. The issue that I am... (1 Reply)
Discussion started by: Sagan
1 Replies

7. Programming

shell scripting problems involving operations with remote machine

Hi, i have been developing a shell script to transfer a set of files from one ubuntu system to another. Task: while executing the script the files ( ls, dir, cat) in the source machine should transfer to destination machine(at /home/mac/mac/bin) While the script is executed once again, It... (0 Replies)
Discussion started by: srijith
0 Replies

8. Shell Programming and Scripting

Unix scripting problems

Hi, In my unix server, i received a file in /usr/data/xmit location. i want to write a unix script after file reached. So how can i write a one line code which chceks the presence of the file? and second line line should take the status of the prevous line. like below. Line 1: checks for the... (16 Replies)
Discussion started by: JSKOBS
16 Replies

9. Shell Programming and Scripting

Execution problems with scripting

Hi, I am new to scripting.I had one problem infront of me.I tried in many ways with minimal knowledge........Kindly help me. Description: I want a shell script where it has to read an input.txt file and need to remove duplicate lines and the result need to kept in output.txt file. input... (5 Replies)
Discussion started by: bhas
5 Replies

10. UNIX for Dummies Questions & Answers

Code commenting Problems in shell scripting

Hi Friends, I Want to comment one line of code from below code. DBA_ORACLE_USER=`DB.sh -u -a User` DBA_ORACLE_PWORD=`DB.sh -p -a User` sqlplus /nolog <<-END > ${logfile} 2>&1 WHENEVER OSERROR EXIT 9 WHENEVER SQLERROR EXIT SQL.SQLCODE connect... (3 Replies)
Discussion started by: as234301
3 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 12:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy