Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Can anyone help me with a shell scripting resume draft or sample Post 302922636 by Corona688 on Monday 27th of October 2014 11:43:50 AM
Old 10-27-2014
Quote:
Originally Posted by walterpeter
Hello members,

Can anyone help me how to draft a shell scripting resume. This might sound off the track from the forum's technical discussion but am struggling to find it on google how to do it exactly. Hence asking for help over here since there are many good number of professionals here.

-thanks in advance
walter
You mean, a script which can resume from a point? We get asked this a lot.

Last time I suggested a script like this:

Code:
STEP=0

[ -f /tmp/stepfile ] && read STEP < /tmp/stepfile

while true
do
        # Init section -- set up variables and stuff #
        ##############################
        # Resume happens here

        case "$STEP" in
        0)      first_program_statement
                ;;
        1)      second_program_statement
                ;;
        *)      echo "Finished all statements -- all done" >&2
                break
                ;;
        esac

        if [ "$?" -ne 0 ]
        then
                 echo "Failure on step $STEP" >&2
                 exit 1
        fi
        let STEP=STEP+1
        echo "$STEP" > /tmp/stepfile
done

echo "all done" >&2
rm -f /tmp/stepfile

This depends on first_program_statement, second_program_statement, etc leaving a useful return code in $? so be careful not to run statements after it which mess it up. (Before is okay.) Also remember that variables aren't saved between executions.

Last edited by Corona688; 10-27-2014 at 12:51 PM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. 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

2. What is on Your Mind?

Are companies viewing my resume? How do I track my resume visits?

Hi everybody, I am wondering if there is any tool or website out there which can track who is viewing my resume. It is very frustrating when you send your CV or Cover Letter and you receive no feedback from the company, you don't even know if they have checked it out. Thanks for your help (1 Reply)
Discussion started by: gearyipswich
1 Replies

3. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

4. Hardware

Cannot resume from suspend with new motherboardktop, does not resume properly

I would like to get pm-suspend (or any other suspend method) working for a small new desktop computer. It is based on a Zotac GF-8200 ITX motherboard and an AMD Athlon II X@ 240 CPU using ArchLinux x86_64. The pm-suspend script works, apparently putting the machine into suspend correctly... (0 Replies)
Discussion started by: lagagnon
0 Replies

5. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

6. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

7. Shell Programming and Scripting

Generate draft email in Outlook with shell script.

Hi All, Is there any way to create a draft mail with HTML body in Outlook using Shell script. (2 Replies)
Discussion started by: Girish19
2 Replies

8. UNIX for Dummies Questions & Answers

Does Shell Scripting in a Resume carry value?

Hi All, I have learnt a lot by getting help from these forums. By the knowledge acquired, i have done the following automations which have helped prevent financial loss to my client. Detecting when the listener goes down - Earlier, a downstream team used to inform us whenever they were not... (2 Replies)
Discussion started by: srkmish
2 Replies

9. UNIX for Advanced & Expert Users

Resume parent shell after sourcing another script

#! /bin/ksh #first.sh echo "b4 set exit as return" alias exit=return echo "call second" . ./second.sh echo "after second" #. ./third.sh unalias exit echo "ho lanciato il terzo" =================// #second.sh echo "in scond" exit ==============// the above code works in k... (2 Replies)
Discussion started by: mprakasheee
2 Replies

10. UNIX for Beginners Questions & Answers

Sample shell script to add a user

Sample shell script to add a user: Today i learn how to add a user to linux server with a password. #!/bin/bash # Script to add a user to Linux system if ; then read -p "Enter username : " username read -s -p "Enter password : " password egrep "^$username" /etc/passwd >/dev/null if ;... (0 Replies)
Discussion started by: ulaxmi
0 Replies
SYSTEMD-HIBERNATE-RESUME-GENERATOR(8)                   systemd-hibernate-resume-generator                   SYSTEMD-HIBERNATE-RESUME-GENERATOR(8)

NAME
systemd-hibernate-resume-generator - Unit generator for resume= kernel parameter SYNOPSIS
/lib/systemd/system-generators/systemd-hibernate-resume-generator DESCRIPTION
systemd-hibernate-resume-generator is a generator that instantiates systemd-hibernate-resume@.service(8) unit according to the value of resume= parameter specified on the kernel command line. KERNEL COMMAND LINE
systemd-hibernate-resume-generator understands the following kernel command line parameters: resume= Takes a path to the resume device. Both persistent block device paths like /dev/disk/by-foo/bar and fstab(5)-style specifiers like "FOO=bar" are supported. SEE ALSO
systemd(1), systemd-hibernate-resume@.service(8), kernel-command-line(7) systemd 237 SYSTEMD-HIBERNATE-RESUME-GENERATOR(8)
All times are GMT -4. The time now is 05:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy