The document discusses the Bash shell, including its history, login process, main features, and syntax. It covers Bash basics like commands, functions, parameters, variables, redirections and scripting. Specific syntax like comments, quotes, loops, conditionals, arithmetic and logical expressions are examined in detail with examples. The document also explores Bash functions, curly braces and local variable definitions within functions.
Bash in theory and in practice - part oneValerio Balbi
The document discusses how bash is invoked on Linux and Mac OS X systems. It shows the process tree from the terminal emulator to the login process to the shell invocation. It identifies that on Linux systems, /etc/passwd defines users and their default shell (typically /bin/bash). It also explores /etc/shadow, /etc/shells and shell configuration files like /etc/profile and ~/.bash_profile that control shell initialization and environment.
Bash is a widely used command line shell for Linux and other Unix-like operating systems. The presentation discusses the history and evolution of Unix-based systems and introduces some of the key features of the Bash shell, including built-in commands, external commands, variables, expansion, loops, conditionals, I/O redirection, and user input handling. It highlights new features introduced in Bash version 4 such as associative arrays, expanded string manipulations, and coprocesses.
Bash is a shell that interprets commands and provides tools to write custom commands. It respects the POSIX standard and is maintained by Chet Ramey. Bash allows editing and completion of commands using readline. It supports expansions like tilde, variables, commands, arithmetic, brace, and more. Bash can operate in default or POSIX mode, which is a subset with no process substitution.
This document discusses the C programming language and its compilation process. It covers preprocessor directives, compiling, assembling, linking, and makefiles. It also briefly mentions language features like function prototypes, inline functions, header files, and magic tricks used in the C implementation.
The document provides an introduction to shell scripting basics in UNIX/Linux systems. It discusses what a shell and shell script are, introduces common shells like bash, and covers basic shell scripting concepts like running commands, variables, conditionals, loops, and calling external programs. Examples are provided for many common shell scripting tasks like file manipulation, text processing, scheduling jobs, and more.
The document discusses common mistakes made in file input/output (I/O) that can lead to data loss. It notes that asynchronous I/O is faster than synchronous I/O but introduces consistency issues. File systems provide weaker consistency guarantees than databases, and operations like close() and rename() do not guarantee data is flushed to disk. The document recommends using transactions and writing to a temporary file followed by renaming to improve data durability.
This document provides a summary of common Linux shell commands and shell scripting concepts. It begins with recapping common commands like ls, cat, grep etc. It then discusses what a shell script is, how to write basic scripts, and covers shell scripting fundamentals like variables, conditionals, loops, command line arguments and more. The document also provides examples of using sed, awk and regular expressions for text processing and manipulation.
Bash in theory and in practice - part oneValerio Balbi
The document discusses how bash is invoked on Linux and Mac OS X systems. It shows the process tree from the terminal emulator to the login process to the shell invocation. It identifies that on Linux systems, /etc/passwd defines users and their default shell (typically /bin/bash). It also explores /etc/shadow, /etc/shells and shell configuration files like /etc/profile and ~/.bash_profile that control shell initialization and environment.
Bash is a widely used command line shell for Linux and other Unix-like operating systems. The presentation discusses the history and evolution of Unix-based systems and introduces some of the key features of the Bash shell, including built-in commands, external commands, variables, expansion, loops, conditionals, I/O redirection, and user input handling. It highlights new features introduced in Bash version 4 such as associative arrays, expanded string manipulations, and coprocesses.
Bash is a shell that interprets commands and provides tools to write custom commands. It respects the POSIX standard and is maintained by Chet Ramey. Bash allows editing and completion of commands using readline. It supports expansions like tilde, variables, commands, arithmetic, brace, and more. Bash can operate in default or POSIX mode, which is a subset with no process substitution.
This document discusses the C programming language and its compilation process. It covers preprocessor directives, compiling, assembling, linking, and makefiles. It also briefly mentions language features like function prototypes, inline functions, header files, and magic tricks used in the C implementation.
The document provides an introduction to shell scripting basics in UNIX/Linux systems. It discusses what a shell and shell script are, introduces common shells like bash, and covers basic shell scripting concepts like running commands, variables, conditionals, loops, and calling external programs. Examples are provided for many common shell scripting tasks like file manipulation, text processing, scheduling jobs, and more.
The document discusses common mistakes made in file input/output (I/O) that can lead to data loss. It notes that asynchronous I/O is faster than synchronous I/O but introduces consistency issues. File systems provide weaker consistency guarantees than databases, and operations like close() and rename() do not guarantee data is flushed to disk. The document recommends using transactions and writing to a temporary file followed by renaming to improve data durability.
This document provides a summary of common Linux shell commands and shell scripting concepts. It begins with recapping common commands like ls, cat, grep etc. It then discusses what a shell script is, how to write basic scripts, and covers shell scripting fundamentals like variables, conditionals, loops, command line arguments and more. The document also provides examples of using sed, awk and regular expressions for text processing and manipulation.
Be pinched by a cRUSTacean to prevent programming errors !René Ribaud
Rust is a new systems programming language that focuses on safety and preventing common programming errors like crashes and security vulnerabilities. It uses concepts like ownership and borrowing to ensure memory safety and avoid use-after-free problems. Rust also enables safe concurrency through its ownership model. The author is interested in Rust because it could help build reliable projects while still having a high performance.
Bash is not a second zone citizen programming languageRené Ribaud
Bash is a widely used command line interpreter and scripting language. It is the default shell for most Linux distributions. While Bash scripts are commonly used to perform important system tasks, they are not always written with the same discipline as other programming languages. Adopting practices like Bash strict mode, following style guides, using functions and testing can help make shell scripts more reliable. Productivity tools like Shellcheck, shfmt and Bats can aid in developing robust Bash scripts.
The document provides an introduction to UNIX shell scripting basics. It discusses what a shell and shell script are, how to run commands and write simple shell scripts using bash. It covers basics like variables, conditionals, loops, pipes and redirection to process inputs, outputs and errors when running programs from shell scripts.
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...Zyxware Technologies
A workshop on "An introduction to BASH shell scripting". Conducted at CSI Students Convention at TKM College of Engineering, Kollam, Kerala on 15th September, 2012
http://www.zyxware.com/articles/3080/zyxware-conducts-workshop-on-bash-scripting-at-tkm-college-of-engineering-kollam
The document provides an introduction to shell scripting basics in UNIX/Linux. It discusses what a shell and shell script are, introduces the popular bash shell, and covers running commands, variables, logic, and other shell scripting concepts. The key points covered include:
- A shell is a program that takes commands and runs other programs. Popular shells include bash, csh, tcsh, and ksh.
- A shell script is a text file containing shell commands that is executable. Creating and running a simple "Hello world" script is demonstrated.
- Running commands, pipes, redirection, variables, logic, and flow control like if/else, for loops are explained.
- Useful bash
Slides from a talk at HPC Admintech 2019 about containers, a brief review on containers, how to create a container using common linux tools and how to integrate Docker with Slurm.
The document discusses shell scripts, including what they are, their components, how to invoke them, get help, and definitions of terms. It provides examples of shell scripting concepts like arguments, regular expressions, quoting, variables, command forms, and simple commands. It also includes examples of shell scripts and proposes homework assignments involving shell scripts.
This document provides an introduction to programming in C and using Unix commands. It discusses functions for input/output like printf, scanf, fopen, fclose, fscanf, and fprintf. Pipes are realized as file descriptors that link output to input. The sendmail command allows transmission of email from C programs by writing to a pipe opened with popen. Overall it covers basic I/O operations in C and how to interface with Unix commands like sendmail.
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
GNU poke is a new interactive editor for binary data. Not limited to editing basic ntities such as bits and bytes, it provides a full-fledged procedural, interactive programming language designed to describe data structures and to operate on them. Once a user has defined a structure for binary data (usually matching some file format) she can search, inspect, create, shuffle and modify abstract entities such as ELF relocations, MP3 tags, DWARF expressions, partition table entries, and so on, with primitives resembling simple editing of bits and bytes. The program comes with a library of already written descriptions (or “pickles” in poke parlance) for many binary formats.
GNU poke is useful in many domains. It is very well suited to aid in the development of programs that operate on binary files, such as assemblers and linkers. This was in fact the primary inspiration that brought me to write it: easily injecting flaws into ELF files in order to reproduce toolchain bugs. Also, due to its flexibility, poke is also very useful for reverse engineering, where the real structure of the data being edited is discovered by experiment, interactively. It is also good for the fast development of prototypes for programs like linkers, compressors or filters, and it provides a convenient foundation to write other utilities such as diff and patch tools for binary files.
This talk (unlike Gaul) is divided into four parts. First I will introduce the program and show what it does: from simple bits/bytes editing to user-defined structures. Then I will show some of the internals, and how poke is implemented. The third block will cover the way of using Poke to describe user data, which is to say the art of writing “pickles”. The presentation ends with a status of the project, a call for hackers, and a hint at future works.
Jose E. Marchesi
This presentation is made for beginners who wish to write a simple script and also help those who already working in the sys-admin, support roles to increase their scope for more experiments in different areas where a developer, sys-admin, app-admin, web-admin can use it.
The document discusses UNIX shell scripts, including what they are, their components, how to invoke them, examples of arguments, variables, command forms, and simple commands that can be used in shell scripts. It provides examples of shell scripts that perform tasks like iterating through a string and checking for available disk space.
DevChatt 2010 - *nix Cmd Line Kung Foobrian_dailey
The document discusses using the command line interface and provides tips on navigation, commands, and customization including keyboard shortcuts, pipes and redirects, aliases, and functions. It promotes learning the shell through writing scripts and provides resources for further learning about bash, arguments, programmable completion, and command line tools. The presentation was given by Brian Dailey to discuss why and how to use the command line interface.
The document provides an overview of the Unix shell and its basic concepts:
- The shell allows users to interact with the operating system by entering commands
- Common Unix shells include bash, csh, and ksh
- The shell prompt displays information about the user and current directory
- Commands can be run internally by the shell or externally by spawning new processes
- Processes have attributes like the command line, exit status, and environment variables
The document discusses shell scripts, including what a shell is, shell configuration, standard input/output/redirection, examples of shell scripts, and syntax for writing shell scripts such as for loops, if/else statements, and case statements. It also covers special parameters and gives an example homework assignment involving creating files for SPARCS 03 members and compressing them into a tarball.
In 2009 the PHP-FIG created PSR-0: an autoloading standard that helped to change the landscape of PHP forever, thanks in no small part to its integration with Composer. Well, PSR-0 was built in a land before PHP had namespaces, when Horde and PEAR were prevalent and Composer was but a twinkle in the eye of two developers. In December 2013 PSR-4 was released as a newer, shinier version of that standard.
The FIG has more standards happening, some of which may be out just in time for this talk.
- Unix is a multi-user networked operating system where every user has different settings and permissions. It handles files, running programs, and input/output.
- The document provides an introduction to Unix compared to Linux and DOS, and describes how to log in, navigate directories, manage files, edit text, compile programs, and get help using man pages.
- It explains basic Unix commands like ls, cd, mkdir, rmdir, rm, cp, and mv for listing, changing directories, creating/removing directories, and manipulating files.
UnQLite is an embedded key-value and document-oriented database with a simple API similar to SQLite. It uses a BSD license and supports cross-platform usage. Benchmarks show it has comparable or better performance than SQLite, Berkeley DB and other databases for common operations like storing, fetching, and iterating over large amounts of data. The developer is working on adding new storage engines to UnQLite.
Introducing Command Line Applications with RubyNikhil Mungel
This document discusses building command line applications in Ruby. It covers using OptionParser and Mixlib::CLI for parsing arguments, Thor for building commands, testing CLI apps, interacting with the system via libraries like Mixlib::ShellOut, and logging to standard output and error. The target audience is developers looking to get started with Ruby command line programs.
This document provides an introduction to Linux and Unix operating systems. It discusses what Unix and Linux are, compares different Linux distributions, and describes basic commands for file navigation, text editing, and system administration. It also lists additional references for further reading. The document is presented as a slideshow that was likely used for a classroom presentation or tutorial on Linux basics.
Wrapped in a single session, you'll find the concepts and techniques that convert the average Git practitioner into a master of the craft. We'll go from technical topics like "efficient conflict resolution" and "effective code cleanup," to the often-asked "how to handle project dependencies with Git" and "how to manage massive repositories." And much more.
Face it, backticks are a pain. BASH $() construct provides a simpler, more effective approach. This talk uses examples from automating git branches and command line processing with getopt(1) to show how $() works in shell scripts.
The document discusses topics for an advanced Bash scripting class, including reviewing homework assignments, standard input/output/redirection, pipelines, functions, here documents, and arrays. Homework problems are presented on matching phone numbers in text and removing one-line comments from C/C++ files. Quiz problems cover writing to standard output and marking numeric constants in code files. Various Bash scripting concepts are reviewed like input/output redirection, case statements, loops, and functions.
Be pinched by a cRUSTacean to prevent programming errors !René Ribaud
Rust is a new systems programming language that focuses on safety and preventing common programming errors like crashes and security vulnerabilities. It uses concepts like ownership and borrowing to ensure memory safety and avoid use-after-free problems. Rust also enables safe concurrency through its ownership model. The author is interested in Rust because it could help build reliable projects while still having a high performance.
Bash is not a second zone citizen programming languageRené Ribaud
Bash is a widely used command line interpreter and scripting language. It is the default shell for most Linux distributions. While Bash scripts are commonly used to perform important system tasks, they are not always written with the same discipline as other programming languages. Adopting practices like Bash strict mode, following style guides, using functions and testing can help make shell scripts more reliable. Productivity tools like Shellcheck, shfmt and Bats can aid in developing robust Bash scripts.
The document provides an introduction to UNIX shell scripting basics. It discusses what a shell and shell script are, how to run commands and write simple shell scripts using bash. It covers basics like variables, conditionals, loops, pipes and redirection to process inputs, outputs and errors when running programs from shell scripts.
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...Zyxware Technologies
A workshop on "An introduction to BASH shell scripting". Conducted at CSI Students Convention at TKM College of Engineering, Kollam, Kerala on 15th September, 2012
http://www.zyxware.com/articles/3080/zyxware-conducts-workshop-on-bash-scripting-at-tkm-college-of-engineering-kollam
The document provides an introduction to shell scripting basics in UNIX/Linux. It discusses what a shell and shell script are, introduces the popular bash shell, and covers running commands, variables, logic, and other shell scripting concepts. The key points covered include:
- A shell is a program that takes commands and runs other programs. Popular shells include bash, csh, tcsh, and ksh.
- A shell script is a text file containing shell commands that is executable. Creating and running a simple "Hello world" script is demonstrated.
- Running commands, pipes, redirection, variables, logic, and flow control like if/else, for loops are explained.
- Useful bash
Slides from a talk at HPC Admintech 2019 about containers, a brief review on containers, how to create a container using common linux tools and how to integrate Docker with Slurm.
The document discusses shell scripts, including what they are, their components, how to invoke them, get help, and definitions of terms. It provides examples of shell scripting concepts like arguments, regular expressions, quoting, variables, command forms, and simple commands. It also includes examples of shell scripts and proposes homework assignments involving shell scripts.
This document provides an introduction to programming in C and using Unix commands. It discusses functions for input/output like printf, scanf, fopen, fclose, fscanf, and fprintf. Pipes are realized as file descriptors that link output to input. The sendmail command allows transmission of email from C programs by writing to a pipe opened with popen. Overall it covers basic I/O operations in C and how to interface with Unix commands like sendmail.
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
GNU poke is a new interactive editor for binary data. Not limited to editing basic ntities such as bits and bytes, it provides a full-fledged procedural, interactive programming language designed to describe data structures and to operate on them. Once a user has defined a structure for binary data (usually matching some file format) she can search, inspect, create, shuffle and modify abstract entities such as ELF relocations, MP3 tags, DWARF expressions, partition table entries, and so on, with primitives resembling simple editing of bits and bytes. The program comes with a library of already written descriptions (or “pickles” in poke parlance) for many binary formats.
GNU poke is useful in many domains. It is very well suited to aid in the development of programs that operate on binary files, such as assemblers and linkers. This was in fact the primary inspiration that brought me to write it: easily injecting flaws into ELF files in order to reproduce toolchain bugs. Also, due to its flexibility, poke is also very useful for reverse engineering, where the real structure of the data being edited is discovered by experiment, interactively. It is also good for the fast development of prototypes for programs like linkers, compressors or filters, and it provides a convenient foundation to write other utilities such as diff and patch tools for binary files.
This talk (unlike Gaul) is divided into four parts. First I will introduce the program and show what it does: from simple bits/bytes editing to user-defined structures. Then I will show some of the internals, and how poke is implemented. The third block will cover the way of using Poke to describe user data, which is to say the art of writing “pickles”. The presentation ends with a status of the project, a call for hackers, and a hint at future works.
Jose E. Marchesi
This presentation is made for beginners who wish to write a simple script and also help those who already working in the sys-admin, support roles to increase their scope for more experiments in different areas where a developer, sys-admin, app-admin, web-admin can use it.
The document discusses UNIX shell scripts, including what they are, their components, how to invoke them, examples of arguments, variables, command forms, and simple commands that can be used in shell scripts. It provides examples of shell scripts that perform tasks like iterating through a string and checking for available disk space.
DevChatt 2010 - *nix Cmd Line Kung Foobrian_dailey
The document discusses using the command line interface and provides tips on navigation, commands, and customization including keyboard shortcuts, pipes and redirects, aliases, and functions. It promotes learning the shell through writing scripts and provides resources for further learning about bash, arguments, programmable completion, and command line tools. The presentation was given by Brian Dailey to discuss why and how to use the command line interface.
The document provides an overview of the Unix shell and its basic concepts:
- The shell allows users to interact with the operating system by entering commands
- Common Unix shells include bash, csh, and ksh
- The shell prompt displays information about the user and current directory
- Commands can be run internally by the shell or externally by spawning new processes
- Processes have attributes like the command line, exit status, and environment variables
The document discusses shell scripts, including what a shell is, shell configuration, standard input/output/redirection, examples of shell scripts, and syntax for writing shell scripts such as for loops, if/else statements, and case statements. It also covers special parameters and gives an example homework assignment involving creating files for SPARCS 03 members and compressing them into a tarball.
In 2009 the PHP-FIG created PSR-0: an autoloading standard that helped to change the landscape of PHP forever, thanks in no small part to its integration with Composer. Well, PSR-0 was built in a land before PHP had namespaces, when Horde and PEAR were prevalent and Composer was but a twinkle in the eye of two developers. In December 2013 PSR-4 was released as a newer, shinier version of that standard.
The FIG has more standards happening, some of which may be out just in time for this talk.
- Unix is a multi-user networked operating system where every user has different settings and permissions. It handles files, running programs, and input/output.
- The document provides an introduction to Unix compared to Linux and DOS, and describes how to log in, navigate directories, manage files, edit text, compile programs, and get help using man pages.
- It explains basic Unix commands like ls, cd, mkdir, rmdir, rm, cp, and mv for listing, changing directories, creating/removing directories, and manipulating files.
UnQLite is an embedded key-value and document-oriented database with a simple API similar to SQLite. It uses a BSD license and supports cross-platform usage. Benchmarks show it has comparable or better performance than SQLite, Berkeley DB and other databases for common operations like storing, fetching, and iterating over large amounts of data. The developer is working on adding new storage engines to UnQLite.
Introducing Command Line Applications with RubyNikhil Mungel
This document discusses building command line applications in Ruby. It covers using OptionParser and Mixlib::CLI for parsing arguments, Thor for building commands, testing CLI apps, interacting with the system via libraries like Mixlib::ShellOut, and logging to standard output and error. The target audience is developers looking to get started with Ruby command line programs.
This document provides an introduction to Linux and Unix operating systems. It discusses what Unix and Linux are, compares different Linux distributions, and describes basic commands for file navigation, text editing, and system administration. It also lists additional references for further reading. The document is presented as a slideshow that was likely used for a classroom presentation or tutorial on Linux basics.
Wrapped in a single session, you'll find the concepts and techniques that convert the average Git practitioner into a master of the craft. We'll go from technical topics like "efficient conflict resolution" and "effective code cleanup," to the often-asked "how to handle project dependencies with Git" and "how to manage massive repositories." And much more.
Face it, backticks are a pain. BASH $() construct provides a simpler, more effective approach. This talk uses examples from automating git branches and command line processing with getopt(1) to show how $() works in shell scripts.
The document discusses topics for an advanced Bash scripting class, including reviewing homework assignments, standard input/output/redirection, pipelines, functions, here documents, and arrays. Homework problems are presented on matching phone numbers in text and removing one-line comments from C/C++ files. Quiz problems cover writing to standard output and marking numeric constants in code files. Various Bash scripting concepts are reviewed like input/output redirection, case statements, loops, and functions.
Il TechAdvisor Roberto Polli condivide l'esperienza maturata su iPython, una potente shell interattiva nata per affiancare la classica shell Bash comunemente utilizzata dagli amministratori di sistema. Attraverso degli esempi pratici mostra le principali differenze tra i due approcci ed aiuta a comprendere quale sia lo strumento più adatto a specifici casi d'uso.
Durante la presentazione mostra inoltre come:
- evitare errori comuni negli script bash;
- velocizzare la creazione di script per l'esecuzione di test mediante la libreria nose;
- riutilizzare moduli Python esistenti nella shell interattiva;
- usare il framework Flask per convertire facilmente gli script in web services.
Code
http://ipython.org/
http://flask.pocoo.org/
http://nose.readthedocs.org/
https://github.com/ioggstream/dsadmin/
Babel
http://www.babel.it
http://vaunaspada.babel.it/blog
While python is widely used for automating administration tasks, it’s not still widely known and used between system administrators.
iPython is an interactive python shell that embeds bash functionalities. We’ll show how to :
* replace some bash tasks avoiding common errors
* resembling some bash behaviour
* create testing (nose) and monitoring scripts
* use flask to expose those scripts on HTTP
This talk will show how it's possible to mock PerlOps using XS and provide a convenient Pure Perl hook for each of the file check -X.
Overload::FileCheck provides a way to mock one or more file checks. It is also possible to mock stat/lstat functions using "mock_all_from_stat" and let Overload::FileCheck mock for you for any other -X checks.
What is wrong on Test::More? / Test::Moreが抱える問題点とその解決策kwatch
The document discusses issues with the Test::More module for testing in Perl and proposes solutions. It notes that Test::More does not encourage writing tests based on specifications, does not structure tests well, and makes it hard to distinguish assertions. It recommends writing tests according to specifications rather than code, using structures like contexts and descriptions to organize tests, and printing output lines on a per-specification rather than per-assertion basis to improve readability. It also proposes functions like spec() and subtest() to help write more specification-based tests with Test::More.
The document discusses various techniques for profiling CPU and memory performance in Rust programs, including:
- Using the flamegraph tool to profile CPU usage by sampling a running process and generating flame graphs.
- Integrating pprof profiling into Rust programs to expose profiles over HTTP similar to how it works in Go.
- Profiling heap usage by integrating jemalloc profiling and generating heap profiles on program exit.
- Some challenges with profiling asynchronous Rust programs due to the lack of backtraces.
The key takeaways are that there are crates like pprof-rs and techniques like jemalloc integration that allow collecting CPU and memory profiles from Rust programs, but profiling asynchronous programs
The document discusses various topics related to continuous integration including:
1. Using Git and Jenkins for continuous integration with commits triggering builds.
2. Various plugins for Jenkins including the Groovy Postbuild Plugin for running Groovy scripts after builds and the Notification Plugin.
3. Methods for running Jenkins on Windows including using Cygwin.
4. The Sakura Script language and using it with the SSTP protocol for notification scripts.
PrizeExample/.DS_Store
__MACOSX/PrizeExample/._.DS_Store
PrizeExample/.git/COMMIT_EDITMSG
Initial Commit
PrizeExample/.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
PrizeExample/.git/description
Unnamed repository; edit this file 'description' to name the repository.
PrizeExample/.git/HEAD
ref: refs/heads/master
PrizeExample/.git/hooks/applypatch-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
test -x "$GIT_DIR/hooks/commit-msg" &&
exec "$GIT_DIR/hooks/commit-msg" ${1+"[email protected]"}
:
PrizeExample/.git/hooks/commit-msg.sample
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
PrizeExample/.git/hooks/post-update.sample
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info
PrizeExample/.git/hooks/pre-applypatch.sample
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit" ${1+"[email protected]"}
:
PrizeExample/.git/hooks/pre-commit.sample
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an .
Back in the ’40s, Samuel Eilenberg and Saunders Mac Lane started developing an entire new branch of mathematics: Category Theory. This was 10 years after Lambda calculus and 10 years before Lisp. Mathematics offers a powerful and concise language; we can represent a lot of complexity with short equations like E=mc2.
This session will explore how programming can harness maths’ capacity for conciseness and expression, borrowing from Category Theory. We’ll discover algebraic data types that can impact the way we code tremendously. You’ll also learn about functors, monads, applicatives, semigroups and monoids and how they can be used in a PHP context.
This document provides an overview of several new features introduced in ECMAScript 6 (ES6), including:
1. Arrow functions which provide a shorter syntax for writing function expressions and retain the lexical this value.
2. Block scoping with let which allows block-level scoping of variables replacing the need for IIFEs in ES5. const is also introduced for single-assignment constants.
3. String templates which make it easier to construct strings and allow interpolation of variables and expressions.
The document discusses best practices for writing bash scripts. It covers topics like using shebangs, setting debug options, creating descriptive variables, command substitution, error handling, and profiling code. The document provides examples and tips for each topic. It emphasizes starting scripts with a header, using variables properly, checking for errors, and understanding the overall problem life cycle for writing better bash scripts.
Best training-in-mumbai-shell scriptingvibrantuser
This document provides an overview of shell scripting. It discusses that shell is the interface between the user and the operating system. Bash is the default shell for Linux systems. Shell scripts allow system administration tasks to be automated without writing full programs. The document outlines shell script syntax including variables, conditions, loops, functions, and commands. It provides examples of how to write shell scripts using these basic elements.
This document provides an overview of key features introduced in ECMAScript 6 (ES6), also known as ECMAScript 2015. It discusses arrow functions, block scoping with let and const, string templates, enhanced object properties, destructuring assignments, default and rest parameters for functions, iterators and generators, and more. Each new feature is explained with examples showing how it improves upon ECMAScript 5 syntax and capabilities.
Presentation on major features of PHP 5.3 for the July 2009 Baltimore/Washington DC PHP Meetup. It touches on major features and changes that were made in the PHP 5.3 series
This document summarizes Denis Zhdanov's presentation on optimizing and securing Nginx configurations. Some key points include:
- Nginx is more scalable than Apache because it uses an event-driven model instead of preforking separate processes per request.
- Locations, variables, and directives like proxy_pass, root, and alias allow complex routing and rewriting of requests. Care must be taken to avoid security issues when passing variables to backends.
- Caching can be optimized for large static files and many small files through tuning buffers, caches, and disk settings.
- Light DDoS attacks can be mitigated using rate limiting, geo blocking, and aggressive caching
This document summarizes a presentation on command line arguments in Perl. It discusses different types of arguments, criteria for handling them, and several popular Perl modules for parsing arguments:
- Do It Yourself: Manually parsing arguments by iterating over @ARGV and pattern matching
- -s Option: Using Perl's built-in -s option for basic argument handling by assigning variables
- Getopt::Long: Popular module that provides argument checking and allows specifying argument types, but has extensive documentation
- Getopt::Declare: More fully-featured module that generates usage statements from a specification, supports argument checking and parsing, but also has extensive documentation and a steeper learning curve.
2005_Structures and functions of MakefileNakCheon Jung
The document discusses the structure and functions of the Linux kernel Makefile. It describes the top-level Makefile and how it builds the kernel image (vmlinux) and modules. It explains the roles of the .config file, architecture Makefiles, Script/Makefile and various Kbuild Makefiles. Key files like obj-y, obj-m and lib-y goals are identified. The document provides an overview of who develops different parts of the kernel build system and lists some important Kbuild files.
Similar to Bash in theory and in practice - part two (20)
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Discover top-tier mobile app development services, offering innovative solutions for iOS and Android. Enhance your business with custom, user-friendly mobile applications.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframePrecisely
Inconsistent user experience and siloed data, high costs, and changing customer expectations – Citizens Bank was experiencing these challenges while it was attempting to deliver a superior digital banking experience for its clients. Its core banking applications run on the mainframe and Citizens was using legacy utilities to get the critical mainframe data to feed customer-facing channels, like call centers, web, and mobile. Ultimately, this led to higher operating costs (MIPS), delayed response times, and longer time to market.
Ever-changing customer expectations demand more modern digital experiences, and the bank needed to find a solution that could provide real-time data to its customer channels with low latency and operating costs. Join this session to learn how Citizens is leveraging Precisely to replicate mainframe data to its customer channels and deliver on their “modern digital bank” experiences.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor IvaniukFwdays
At this talk we will discuss DDoS protection tools and best practices, discuss network architectures and what AWS has to offer. Also, we will look into one of the largest DDoS attacks on Ukrainian infrastructure that happened in February 2022. We'll see, what techniques helped to keep the web resources available for Ukrainians and how AWS improved DDoS protection for all customers based on Ukraine experience
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/how-axelera-ai-uses-digital-compute-in-memory-to-deliver-fast-and-energy-efficient-computer-vision-a-presentation-from-axelera-ai/
Bram Verhoef, Head of Machine Learning at Axelera AI, presents the “How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-efficient Computer Vision” tutorial at the May 2024 Embedded Vision Summit.
As artificial intelligence inference transitions from cloud environments to edge locations, computer vision applications achieve heightened responsiveness, reliability and privacy. This migration, however, introduces the challenge of operating within the stringent confines of resource constraints typical at the edge, including small form factors, low energy budgets and diminished memory and computational capacities. Axelera AI addresses these challenges through an innovative approach of performing digital computations within memory itself. This technique facilitates the realization of high-performance, energy-efficient and cost-effective computer vision capabilities at the thin and thick edge, extending the frontier of what is achievable with current technologies.
In this presentation, Verhoef unveils his company’s pioneering chip technology and demonstrates its capacity to deliver exceptional frames-per-second performance across a range of standard computer vision networks typical of applications in security, surveillance and the industrial sector. This shows that advanced computer vision can be accessible and efficient, even at the very edge of our technological ecosystem.
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsDianaGray10
Join us to learn how UiPath Apps can directly and easily interact with prebuilt connectors via Integration Service--including Salesforce, ServiceNow, Open GenAI, and more.
The best part is you can achieve this without building a custom workflow! Say goodbye to the hassle of using separate automations to call APIs. By seamlessly integrating within App Studio, you can now easily streamline your workflow, while gaining direct access to our Connector Catalog of popular applications.
We’ll discuss and demo the benefits of UiPath Apps and connectors including:
Creating a compelling user experience for any software, without the limitations of APIs.
Accelerating the app creation process, saving time and effort
Enjoying high-performance CRUD (create, read, update, delete) operations, for
seamless data management.
Speakers:
Russell Alfeche, Technology Leader, RPA at qBotic and UiPath MVP
Charlie Greenberg, host
25. 19.06.2013
03.07.2013 @pvb265 #imolug
bash
Basics
Commands
Functions
Parameters
Variables
Redirections
Scripting
Syntax
command verb parameter1 parameter2 parameter3 ...
looping until while for command
if test-command; then commands; ficonditional
if test-command; then commands; else commands; fi
if test-command; then commands; elif commands; else commands; fi
if test-command; then commands; (elif commands;)* else commands; fi
case name in value) commands;; … value) commands;; esac;
select name in words; do commands; done
26. 19.06.2013
03.07.2013 @pvb265 #imolug
bash
Basics
Commands
Functions
Parameters
Variables
Redirections
Scripting
Syntax
command verb parameter1 parameter2 parameter3 ...
looping until while for command
if test-command; then commands; ficonditional
if test-command; then commands; else commands; fi
if test-command; then commands; elif commands; else commands; fi
if test-command; then commands; (elif commands;)* else commands; fi
case name in (value) commands;; )+ esac commands;
select name in words; do commands; done
MacBook-Pro-di-valerio:~ valeriobalbi$ export i=start; case $i in
> start)
> echo "start command placeholder";;
> stop)
> echo "stopping command placeholder";;
> esac
Start command placeholder
27. 19.06.2013
03.07.2013 @pvb265 #imolug
bash
Basics
Commands
Functions
Parameters
Variables
Redirections
Scripting
Syntax
command verb parameter1 parameter2 parameter3 ...
looping until while for command
if test-command; then commands; ficonditional
if test-command; then commands; else commands; fi
if test-command; then commands; elif commands; else commands; fi
if test-command; then commands; (elif commands;)* else commands; fi
case name in (value) commands;; )+ esac commands;
select name in words; do commands; done
MacBook-Pro-di-valerio:~ valeriobalbi$ export i=”one two”; select j in $i; do echo $j; done
1) one
2) two
#? 1
one
30. 19.06.2013
03.07.2013 @pvb265 #imolug
bash
Basics
Commands
Functions
Parameters
Variables
Redirections
Scripting
Syntax
command verb parameter1 parameter2 parameter3 ...
looping until while for command
if case select commandconditional
arithmetics
logical complex
MacBook-Pro-di-valerio:~ valeriobalbi$ if [[ -a /etc/passwd || -b /etc/passwd ]]; then ls -l /etc/passwd; fi
-rw-r--r-- 1 root wheel 5148 18 Nov 2011 /etc/passwd
MacBook-Pro-di-valerio:~ valeriobalbi$ if [[ -a /etc/passwd && -b /etc/passwd ]]; then ls -l /etc/passwd; fi
MacBook-Pro-di-valerio:~ valeriobalbi$
(( expression ))
[[ expression ]]
36. 19.06.2013
03.07.2013 @pvb265 #imolug
bash
Basics
Commands
Functions
Parameters
Variables
Redirections
Scripting
Syntax
parentheses ( list )
curly brace
new environment, space needed
{ list; } same environment, operational token
built-in function
function definition
. filename
break n
cd ..
cd -
cd directory
eval
exec command
exit n
export
pwd
readonly name
return n
shift n
test
umask mode
unset name
alias name=value
command name
echo
help
local name=value
let
printf format values
read n
source filename
ulimit
unalias
bash specificsh specific
61. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
[root@doc rc3.d]# cd ../init.d/
[root@doc init.d]# ls -l
totale 320
-rwxr-xr-x. 1 root root 1288 23 feb 05:39 abrt-ccpp
…
-rwxr-xr-x. 1 root root 1698 22 feb 06:38 sandbox
-rwxr-xr-x. 1 root root 2056 20 nov 2012 saslauthd
-rwxr-xr-x. 1 root root 647 9 gen 12:13 single
-rwxr-xr-x. 1 root root 3002 21 feb 23:26 smartd
-rwxr-xr-x. 1 root root 4534 22 feb 04:51 sshd
-rwxr-xr-x. 1 root root 2647 29 apr 09:50 sssd
-rwxr-xr-x. 1 root root 1228 22 giu 2012 sysstat
-rwxr-xr-x. 1 root root 2294 22 feb 06:22 udev-post
-rwxr-xr-x. 1 root root 1608 22 feb 05:09 winbind
-rwxr-xr-x. 1 root root 4799 22 feb 00:23 ypbind
[root@doc init.d]# file sshd
sshd: Bourne-Again shell script text executable
62. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
#!/bin/bash
#
# sshd Start up the OpenSSH server daemon
#
# chkconfig: 2345 55 25
# description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
#
# processname: sshd
# config: /etc/ssh/ssh_host_key
# config: /etc/ssh/ssh_host_key.pub
# config: /etc/ssh/ssh_random_seed
# config: /etc/ssh/sshd_config
# pidfile: /var/run/sshd.pid
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
63. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
#!/bin/bash
#
# sshd Start up the OpenSSH server daemon
#
# chkconfig: 2345 55 25
# description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
#
# processname: sshd
# config: /etc/ssh/ssh_host_key
# config: /etc/ssh/ssh_host_key.pub
# config: /etc/ssh/ssh_random_seed
# config: /etc/ssh/sshd_config
# pidfile: /var/run/sshd.pid
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
64. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
65. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
66. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
67. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
68. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
69. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
70. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
# Short-Description: Start up the OpenSSH server daemon
# Description: SSH is a protocol for secure remote shell access.
# This service starts up the OpenSSH server daemon.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
RETVAL=0
prog="sshd"
lockfile=/var/lock/subsys/$prog
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
runlevel=$(set -- $(runlevel); eval "echo $$#" )
71. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
fips_enabled() {
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi
}
do_rsa1_keygen() {
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
if [ -x /sbin/restorecon ]; then
/sbin/restorecon $RSA1_KEY.pub
fi
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi
}
72. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
fips_enabled() {
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi
}
do_rsa1_keygen() {
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
if [ -x /sbin/restorecon ]; then
/sbin/restorecon $RSA1_KEY.pub
fi
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi
}
73. 19.06.2013
03.07.2013 @pvb265 #imolug
bash Example
fips_enabled() {
if [ -r /proc/sys/crypto/fips_enabled ]; then
cat /proc/sys/crypto/fips_enabled
else
echo 0
fi
}
do_rsa1_keygen() {
if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
echo -n $"Generating SSH1 RSA host key: "
rm -f $RSA1_KEY
if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
if [ -x /sbin/restorecon ]; then
/sbin/restorecon $RSA1_KEY.pub
fi
success $"RSA1 key generation"
echo
else
failure $"RSA1 key generation"
echo
exit 1
fi
fi
}