BASH SCRIPT TIPS. function jumpto { label=$1 cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 grep -v ':$') eval "$cmd" exit }
|
|
- Gilbert Hines
- 5 years ago
- Views:
Transcription
1 BASH SCRIPT TIPS Is user in the dialout group? Is there a goto in bash scripting? cat /etc/group grep dialout grep $USER if [ $R = "0" ] echo "$USER is in the dialout group" sudo adduser $USER dialout echo "$USER has been added to the dialout group" # Dene a "jumpto" function function jumpto { label=$1 cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 grep -v ':$') eval "$cmd" exit } jumpto startup How do I know what version of Linux I m running? startup: cat /etc/os-release NAME="Linux Mint" VERSION="18.1 (Serena)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 18.1" VERSION_ID="18.1" HOME_URL=" SUPPORT_URL=" BUG_REPORT_URL=" VERSION_CODENAME=serena UBUNTU_CODENAME=xenial env grep VERSION VTE_VERSION=4205 CINNAMON_VERSION=3.2.7
2 ~ $ cat /etc/issue.net Linux Mint 18.1 Serena How do I get pavucontrol for setting my audio levels? How do I get the output from a web site such as sourceforge.net for fldigi How do I sort a list so that only unique names are listed? How do I fetch the le using the full path? How do I keep just the part of the name after the last slash? How do I take off the tar.gz sufx? How do I extract the contents of a tar.gz le? How do I change to that directory? How do I save all but the last character? How do I know how much memory I have left? How do I nd out what network connections I have? How do I show my WiFi connections? uname -a Linux ron-xps generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux sudo apt-get install pavucontrol # Install pavucontrol for audio wget -q sourceforge.net/projects/fldigi/les/$i/ >get-list.out cat get-list.out sort -u <get-list.txt >getlist.txt gzname= fltk.org/pub/fltk/1.3.4/fltk source.tar.gz wget $gzname &>/dev/null wrd=${gzname##*/} len=${#word} neword=${wrd:0:$len-7} tar xzf fltk source.tar.gz cd $neword # retain part after last slash wrd=${word:0:$len-1} # Save all but the last character ronh@ron-xps /etc $ free (shown in kilobytes) total used free shared buff/cache available Mem: Swap: Ifcong Output can include en0, eth0, enp3s0, etc. depending on kernel version ifcong grep wlan ifcong grep wlp iwlist $WLAN scanning WLAN = name found, e.g. wlan0 on older kernels and wlp on newer Linux kernels e.g. wlp5s0
3 How much space is left on my hard drives? How do I use a case statement? How do I know if a command succeeded? How do I nd out the current K- index and solar flux? ronh@ron-xps /etc $ df -h (-h means human-readable) Filesystem Size Used Avail Use% Mounted on udev 16G 0 16G 0% /dev tmpfs 3.2G 18M 3.2G 1% /run /dev/sdb4 64G 38G 23G 63% / tmpfs 16G 848K 16G 1% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 16G 0 16G 0% /sys/fs/cgroup cgmfs 100K 0 100K 0% /run/cgmanager/fs tmpfs 3.2G 24K 3.2G 1% /run/user/1000 /dev/sde1 121G 90G 31G 75% /media/ronh/gb128 /dev/sda1 1.4T 147G 1.2T 11% /media/ronh/gb1400 /dev/sda2 489G 4.5G 484G 1% /media/ronh/gb500 /dev/sdb5 164G 118G 38G 76% /media/ronh/cd7e099b-f99b-4388-b09fcff3fb05540e echo "$f4" grep tar.gz >/dev/null case $R in 0 ) word=$f4 ;; default ) word=$f5 ;; esac wget $gzname &>/dev/null # Fetch the le # Get the result of the wget command if [ $R = "0" ] echo "" echo "Unable to fetch $gzname - ABORTING" jumpto doabort # wget -np grep Solar flux wwv.txt grep K-index wwv.txt These are just some of things I ve learned along the way writing scripts for fldigi installs, setting up a weather server at home, creating html pages from a script, etc. Most were learned by googling what I wanted to do, trying the various examples.
4 For example, to create a web page in a shell script, this is how I generate the html page for my weather server: # makehtml # Reads readings.txt and produces readings.htm # TGT="readings.htm" SRC="readings.txt" LINE=1 echo "<html><head><title>wx READINGS</title>">$TGT echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"60\"">>$TGT echo "</head>">>$tgt echo "<body bgcolor=palegreen>">>$tgt echo "<table border=4>">>$tgt echo "<tr><td>">>$tgt echo "<font size=4>">>$tgt cat $SRC while read f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 do # This is the title at the top of the page # This causes the page to refresh every 60 seconds # make the body background color a palegreen # start a table # start a row and data entry # Set the font size # read the source and put it in the page if [ $LINE -eq 1 ] echo -n "<b>">>$tgt echo "$f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 <hr>">>$tgt echo "</b>">>$tgt LINE=0 echo "$f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10<br>">>$tgt done echo "</td></tr>">>$tgt # Close the data and row echo "<tr><td align=center>">>$tgt # next table data is centered echo "<font size=2>">>$tgt # set font size to 2 echo "Readings are updated <br>automatically every 5 minutes at DM42ji</td>">>$TGT #close the table data echo "</tr>">>$tgt # close the row echo "</table>">>$tgt # close the table echo "</body></html>">>$tgt # end the html page Sometimes, a shell script can only do so much, or it would take an inordinate amount of time to create. Then I revert to the C language. Having used C since about 1977, I do a lot of my programming in C just because it is fast and easy for me. A plus is the fact that most Linux distributions have a C compiler built in to them. I learned C and Unix from the guys at Bell Labs when I was working for Pacic Northwest Bell as a senior analyst and troubleshooter for their Electronic Switching Systems. Back we used a DEC PDP-7 and PDP-45. Now that is nostalgic :-)
5 Hopefully you will nd these useful. They will also be appearing in the April SIG newsletter. Ron W7HD
UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES COMPUTING WITH WEBSITE DEVELOPMENT SEMESTER ONE EXAMINATIONS 2018/2019 UNIX MODULE NO: CPU5003
[CRT08] UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES COMPUTING WITH WEBSITE DEVELOPMENT SEMESTER ONE EXAMINATIONS 2018/2019 UNIX MODULE NO: CPU5003 Date: Wednesday 16 th January 2019 Time: 10:00 12:00 INSTRUCTIONS
More informationFirst Five Minutes on a System. What to do and why
First Five Minutes on a System What to do and why Guidelines and Ideas No hard rules Started writing at 4:21pm Jan 21 Please feel free to POLITELY comment ** means a real life example with names removed
More informationIntroduction To Linux. Rob Thomas - ACRC
Introduction To Linux Rob Thomas - ACRC What Is Linux A free Operating System based on UNIX (TM) An operating system originating at Bell Labs. circa 1969 in the USA More of this later... Why Linux? Free
More informationGetting Started with Linux Development
Getting Started with Linux Development VB-Linux on your Laptop First, on your Windows or Mac OS-X laptop, install Oracle Virtual-Box as follows: First, download Ubuntu Linux distribution 12.04.1, or newer
More informationUpgrade Cisco Interface Module for LoRaWAN IXM using the Console
Upgrade Cisco Interface Module for LoRaWAN IXM using the Console Contents Introduction Prerequisites Requirements Components Used Background Information Configure Step 1. Prepare the firmware images (and
More informationLinux Essentials Objectives Topics:
Linux Essentials Linux Essentials is a professional development certificate program that covers basic knowledge for those working and studying Open Source and various distributions of Linux. Exam Objectives
More informationPractical 5. Linux Commands: Working with Files
Practical 5 Linux Commands: Working with Files 1. Ps The ps command on linux is one of the most basic commands for viewing the processes running on the system. It provides a snapshot of the current processes
More informationIntroduction to the shell Part II
Introduction to the shell Part II Graham Markall http://www.doc.ic.ac.uk/~grm08 grm08@doc.ic.ac.uk Civil Engineering Tech Talks 16 th November, 1pm Last week Covered applications and Windows compatibility
More informationIntroduction to Linux
Introduction to Linux University of Bristol - Advance Computing Research Centre 1 / 47 Operating Systems Program running all the time Interfaces between other programs and hardware Provides abstractions
More informationPart 1: Installing MongoDB
Samantha Orogvany-Charpentier CSU ID: 2570586 Installing NoSQL Systems Part 1: Installing MongoDB For my lab, I installed MongoDB version 3.2.12 on Ubuntu 16.04. I followed the instructions detailed at
More informationLinux Kung Fu. Stephen James UBNetDef, Spring 2017
Linux Kung Fu Stephen James UBNetDef, Spring 2017 Introduction What is Linux? What is the difference between a client and a server? What is Linux? Linux generally refers to a group of Unix-like free and
More informationAdvantech General FAQ. How to change ubuntu specific kernel for quick cross test
Advantech General FAQ How to change ubuntu specific kernel for quick cross test Applicable model list Model name version BIOS Version Description: All N/A N/A Products sometimes behave different with different
More informationGNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018
GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux
More informationVi & Shell Scripting
Vi & Shell Scripting Comp-206 : Introduction to Week 3 Joseph Vybihal Computer Science McGill University Announcements Sina Meraji's office hours Trottier 3rd floor open area Tuesday 1:30 2:30 PM Thursday
More informationIntroduction to Linux (Part I) BUPT/QMUL 2018/03/14
Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Contents 1. Background on Linux 2. Starting / Finishing 3. Typing Linux Commands 4. Commands to Use Right Away 5. Linux help continued 2 Contents 6.
More informationCS197U: A Hands on Introduction to Unix
CS197U: A Hands on Introduction to Unix Lecture 4: My First Linux System Tian Guo University of Massachusetts Amherst CICS 1 Reminders Assignment 2 was due before class Assignment 3 will be posted soon
More informationR- installation and adminstration under Linux for dummie
R- installation and adminstration under Linux for dummies University of British Columbia Nov 8, 2012 Outline 1. Basic introduction of Linux Why Linux (department servers)? Some terminology Tools for windows
More informationBourne Shell Reference
> Linux Reviews > Beginners: Learn Linux > Bourne Shell Reference Bourne Shell Reference found at Br. David Carlson, O.S.B. pages, cis.stvincent.edu/carlsond/cs330/unix/bshellref - Converted to txt2tags
More informationNational University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual
National University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual Objective This lab is all about running commands in Ubuntu Terminal and compiling C program in Ubuntu Table of
More informationIntroduction. What is Linux? What is the difference between a client and a server?
Linux Kung Fu Introduction What is Linux? What is the difference between a client and a server? What is Linux? Linux generally refers to a group of Unix-like free and open-source operating system distributions
More informationUseful Unix Commands Cheat Sheet
Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List
More informationOverview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions
Lanka Education and Research Network Linux Architecture, Linux File System, Linux Basic Commands 28 th November 2016 Dilum Samarasinhe () Overview History of Linux Linux Architecture Linux File System
More informationEE516: Embedded Software Project 1. Setting Up Environment for Projects
EE516: Embedded Software Project 1. Setting Up Environment for Projects By Dong Jae Shin 2015. 09. 01. Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment
More informationLinux Kung Fu. Ross Ventresca UBNetDef, Fall 2017
Linux Kung Fu Ross Ventresca UBNetDef, Fall 2017 GOTO: https://apps.ubnetdef.org/ What is Linux? Linux generally refers to a group of Unix-like free and open source operating system distributions built
More information3.5 Inch TFT Display
3.5 Inch TFT Display Resistive&Capacity Touch Screen Website: www.inno-maker.com Contact: sales@inno-maker.com, support@inno-maker.com 1 Website: www.inno-maker.com Contact: sales@inno-maker.com, support@inno-maker.com
More informationHow to install Toshiba Satellite L40 B14 Wireless Adapter ( ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B) on Ubuntu and Debian Linux
How to install Toshiba Satellite L40 B14 Wireless Adapter ( ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B) on Ubuntu and Debian Linux Author : admin How to install Toshiba L40 B14 Wireless Adapter
More informationInsight Control Server Provisioning Capturing and Installing SUSE Enterprise Linux 12 System Images
Technical white paper Insight Control Server Provisioning Capturing and Installing SUSE Enterprise Linux 12 System Images Table of contents Summary 2 Preparing for image capture 2 Sanitizing server image
More informationSingularity: container formats
Singularity Easy to install and configure Easy to run/use: no daemons no root works with scheduling systems User outside container == user inside container Access to host resources Mount (parts of) filesystems
More informationIt is recommended to complete the tutorial using a web browser from the same operating system as your Putty or SSH client (e.g. Ubuntu terminal).
TCSS 562: Software Engineering Institute of Technology for Cloud Computing University of Washington Tacoma Spring 2017 http://faculty.washington.edu/wlloyd/courses/tcss562 Tutorial 1 Benchmarking Amazon
More informationCS 300 Data Structures
CS 300 Data Structures Introduction 1 Topics Data Structures Linux C Programming Software Development Tools Software Development Methods 2 UNIX/Linux/GNU UNIX is an Operating System (OS) 1969 at Bell Labs
More informationLinux Mint Error Mounting Mount Exited With Exit Code 13
Linux Mint Error Mounting Mount Exited With Exit Code 13 "Error mounting /dev/sdb1 at /media/fuzzy27/my Book: Command-line 'mount -t "ntfs" -o "/dev/sdb1" "/media/fuzzy27/my Book"' exited with non-zero
More informationLinux and Network Administra3on. Lorenzo Bracciale Marco Bonola
Linux and Network Administra3on Lorenzo Bracciale Marco Bonola What is Linux? Outline Who is this guy? Who is this guy? Compiler Editor Human Interface Filesystem Networking OS Kernel Scheduler Device
More informationPerl and R Scripting for Biologists
Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications
More informationLinux Systems Administration Getting Started with Linux
Linux Systems Administration Getting Started with Linux Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International
More informationIn the sections below, we shall see how easy it is to work with btrfs and specifically how to recover from disk out-of-spac e issues.
About btrfs and Docker Btrfs (pronounc ed better-fs) is a highly advanc ed and fully stable Linux filesystem that offers many c ompelling and useful features like Copy-On-Write, snapshotting, Raiding,
More informationDEMO SESSION. How to Turn a Raspberry Pi into a Low-Power Network Attached Storage (NAS)?
LUV Beginners Workshop 20 August 2016 Wen Lin s Talk: File Sharing in Linux DEMO SESSION How to Turn a Raspberry Pi into a Low-Power Network Attached Storage (NAS)? (1) Components involved (Hardware /
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationCS 460 Linux Tutorial
CS 460 Linux Tutorial http://ryanstutorials.net/linuxtutorial/cheatsheet.php # Change directory to your home directory. # Remember, ~ means your home directory cd ~ # Check to see your current working
More informationEmbedded System Design
Embedded System Design Lecture 10 Jaeyong Chung Systems-on-Chips (SoC) Laboratory Incheon National University Environment Variables Environment variables are a set of dynamic named values that can affect
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationEmbedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island
Embedded Linux Systems Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Generic Embedded Systems Structure User Sensors ADC microcontroller
More informationCISC 220 fall 2011, set 1: Linux basics
CISC 220: System-Level Programming instructor: Margaret Lamb e-mail: malamb@cs.queensu.ca office: Goodwin 554 office phone: 533-6059 (internal extension 36059) office hours: Tues/Wed/Thurs 2-3 (this week
More informationCSCM98 Lab Class #5 Getting familiar with the command line
CSCM98 Lab Class #5 Getting familiar with the command line Lab Class Description. Unix has some powerful commands that can be combined inside shell scripts. Today we will have a look at various commands
More informationUnix Tools / Command Line
Unix Tools / Command Line An Intro 1 Basic Commands / Utilities I expect you already know most of these: ls list directories common options: -l, -F, -a mkdir, rmdir make or remove a directory mv move/rename
More informationUNIX System Programming Lecture 3: BASH Programming
UNIX System Programming Outline Filesystems Redirection Shell Programming Reference BLP: Chapter 2 BFAQ: Bash FAQ BMAN: Bash man page BPRI: Bash Programming Introduction BABS: Advanced Bash Scripting Guide
More informationLinux Development Getting Started
Linux Development Getting Started VB-Linux on your Laptop Convenient Option Compared to Remote Transformer Access First, on your Windows or Mac OS-X laptop, install Oracle Virtual-Box as follows: First,
More informationUtilities. September 8, 2015
Utilities September 8, 2015 Useful ideas Listing files and display text and binary files Copy, move, and remove files Search, sort, print, compare files Using pipes Compression and archiving Your fellow
More informationCS197U: A Hands on Introduction to Unix
CS197U: A Hands on Introduction to Unix Lecture 11: WWW and Wrap up Tian Guo University of Massachusetts Amherst CICS 1 Reminders Assignment 4 was graded and scores on Moodle Assignment 5 was due and you
More informationITST Searching, Extracting & Archiving Data
ITST 1136 - Searching, Extracting & Archiving Data Name: Step 1 Sign into a Pi UN = pi PW = raspberry Step 2 - Grep - One of the most useful and versatile commands in a Linux terminal environment is the
More informationChecking Resource Usage in Fedora (Linux)
Lab 5C Checking Resource Usage in Fedora (Linux) Objective In this exercise, the student will learn how to check the resources on a Fedora system. This lab covers the following commands: df du top Equipment
More informationGrep and Shell Programming
Grep and Shell Programming Comp-206 : Introduction to Software Systems Lecture 7 Alexandre Denault Computer Science McGill University Fall 2006 Teacher's Assistants Michael Hawker Monday, 14h30 to 16h30
More informationu-root: / with the convenience of scripting and the performance of compilation
u-root: / with the convenience of scripting and the performance of compilation Ron Minnich Google Andrey Mirtchovski Cisco Outline What u-root is Why we re doing it How it all works Try it! sudo docker
More informationContents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...
Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing
More informationHow To Resize ext3 Partitions Without Losing Data
By Falko Timme Published: 2007-01-07 17:12 How To Resize ext3 Partitions Without Losing Data Version 1.0 Author: Falko Timme Last edited 12/31/2006 This article is about
More informationNetcat Scanning to Backdoors
Netcat Scanning to Backdoors Security & Privacy on the Internet (03-60-467) Fall 2009 Submitted to Dr. A.K. Aggarwal Submitted By Jeffrey Kurcz School of Computer Science University of Windsor CONTENTS
More informationIntroduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University
Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an
More informationSome Ubuntu Practice...
Some Ubuntu Practice... SANOG 10 August 29 New Delhi, India 1. Get used to using sudo 2. Create an inst account 3. Learn how to install software 4. Install gcc and make 5. Learn how to control services
More informationThe Ultimate Linux/Windows System
The Ultimate Linux/Windows System Kevin Farnham Abstract Use cross-platform applications and shared data for the ultimate Linux/Windows system. I recently converted my Toshiba notebook computer into a
More informationSystem Administration
Süsteemihaldus MTAT.08.021 System Administration File system basics UNIX shell basics 1/23 2/23 3/23 4/23 5/23 6/23 System Root Mount points User Profiles /home /boot /dev/sda Boot loader files and Linux
More informationWhat is Bash Shell Scripting?
What is Bash Shell Scripting? A shell script is a script written for the shell, or command line interpreter, of an operating system. The shell is often considered a simple domain-specic programming language.
More informationbash Scripting Introduction COMP2101 Winter 2019
bash Scripting Introduction COMP2101 Winter 2019 Command Lists A command list is a list of one or more commands on a single command line in bash Putting more than one command on a line requires placement
More informationDAVE LIDDAMENT INTRODUCTION TO BASH
DAVE LIDDAMENT INTRODUCTION TO BASH @daveliddament FORMAT Short lectures Practical exercises (help each other) Write scripts LEARNING OBJECTIVES What is Bash When should you use Bash Basic concepts of
More informationSANJAY GHODAWAT POLYTECHNIC
EXPERIMENT NO. 01 Name of Experiment Implement following commands with their options: ps and kill. df and du mount and umount. (4 Hours) Prerequisite of. / execution of Basic knowledge about linux command.
More informationUsing Ruby and irb in CSE 341 Winter 2015
Using Ruby and irb in CSE 341 Winter 2015 Overview This is a long version of the directions for installing Ruby. The last two homeworks will be using the Ruby language. We recommend editing your files
More informationLecture # 2 Introduction to UNIX (Part 2)
CS390 UNIX Programming Spring 2009 Page 1 Lecture # 2 Introduction to UNIX (Part 2) UNIX is case sensitive (lowercase, lowercase, lowercase) Logging in (Terminal Method) Two basic techniques: 1. Network
More informationPost Ubuntu Install Exercises
Post Ubuntu Install Exercises PacNOG 3 June 18 Rarotonga, Cook Islands 1. Get used to using sudo 2. Create an ainst account 3. Learn how to install software 4. Install gcc and make 5. Learn how to control
More informationUNIT 9 Introduction to Linux and Ubuntu
AIR FORCE ASSOCIATION S CYBERPATRIOT NATIONAL YOUTH CYBER EDUCATION PROGRAM UNIT 9 Introduction to Linux and Ubuntu Learning Objectives Participants will understand the basics of Linux, including the nature,
More information2 nd SEE 6DISS Workshop Plovdiv June Host Configuration (Windows XP) Athanassios Liakopoulos
2 nd SEE 6DISS Workshop Plovdiv 27-29 June 2007 Host Configuration (Windows XP) Athanassios Liakopoulos aliako@grnet.gr 1. Lab information Network Topology The network topology is shown in Figure 1. PCs
More informationOpenSSL Software Foundation, Inc.
OpenSSL Software Foundation, Inc 1829 Mount Ephraim Road Adamstown, MD 21710 USA +1 877 673 6775 support@opensslfoundationcom Instructions for CMVP Testing TS Linux on ARMv4 November 16, 2014 Table of
More informationFormatting 1. Commands starting with $ are Linux console commands on the host PC:
Custom Kernel Guide by Arrvindh Shriraman Last update: April 1, 2016 This document guides the user through: 1. Downloading and compiling the Linux kernel's source code. 2. Running a custom kernel inside
More informationCOMP 4/6262: Programming UNIX
COMP 4/6262: Programming UNIX Lecture 12 shells, shell programming: passing arguments, if, debug March 13, 2006 Outline shells shell programming passing arguments (KW Ch.7) exit status if (KW Ch.8) test
More informationInstalling PHP on Windows 10 Bash and Starting a Local Server
Installing PHP on Windows 10 Bash and Starting a Local Server Bash on Ubuntu/Windows is a way to use a command line to run all kinds of programs (including git!). But we ll want a Bash terminal to run
More informationShell programming. Introduction to Operating Systems
Shell programming Introduction to Operating Systems Environment variables Predened variables $* all parameters $# number of parameters $? result of last command $$ process identier $i parameter number
More informationPlease choose the best answer. More than one answer might be true, but choose the one that is best.
Introduction to Linux and Unix - endterm Please choose the best answer. More than one answer might be true, but choose the one that is best. SYSTEM STARTUP 1. A hard disk master boot record is located:
More informationLinux shell scripting Getting started *
Linux shell scripting Getting started * David Morgan *based on chapter by the same name in Classic Shell Scripting by Robbins and Beebe What s s a script? text file containing commands executed as a unit
More informationSpreedbox Getting Started Guide
Spreedbox Getting Started Guide Last Updated: September 2017 CONTENTS 1. Introduction... 3 2. Prerequisites... 4 3. Opening the box... 5 4. USB Manual, Quick Start Guide & MAC Sticker... 6 5. International
More informationShell. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong
Shell Prof. Jinkyu Jeong (Jinkyu@skku.edu) TA -- Minwoo Ahn (minwoo.ahn@csl.skku.edu) TA -- Donghyun Kim (donghyun.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu
More informationUsing RDP with Azure Linux Virtual Machines
Using RDP with Azure Linux Virtual Machines 1. Create a Linux Virtual Machine with Azure portal Create SSH key pair 1. Install Ubuntu Bash shell by downloading and running bash.exe file as administrator.
More informationA113X1 Development Kit
A113X1 Development Kit User Guide Revision: 4.0 Release Date: 2018-02-06 Amlogic, Ltd. COPYRIGHT 2017 Amlogic, Ltd. All rights reserved. No part of this document may be reproduced. Transmitted, transcribed,
More informationDEVELOPMENT GUIDE AMOS-820. Linux BSP v
DEVELOPMENT GUIDE AMOS-820 Linux BSP v4.1.1 1.00-05242017-134700 Copyright Copyright 2017 VIA Technologies Incorporated. All rights reserved. No part of this document may be reproduced, transmitted, transcribed,
More informationWireless Network Access at Swinburne Using FreeBSD 5.3
802.11 Wireless Network Access at Swinburne Using FreeBSD 5.3 CAIA Technical Report 041221A Jason But December 21st, 2004 Introduction FreeBSD is a UNIX oriented operating system which is also the default
More informationCourse Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1
Today s Topics Web Resources Amazon EC2 Linux Apache PHP Workflow and Tools Extensible Networking Platform 1 1 - CSE 330 Creative Programming and Rapid Prototyping Course Wiki Extensible Networking Platform
More informationCSCI2467: Systems Programming Concepts
CSCI2467: Systems Programming Concepts Class activity: bash shell literacy Instructor: Matthew Toups Fall 2017 Today 0 Shells History Usage Scripts vs. Programs 1 Bash shell: practical uses for your systems
More informationSection 1. A zseries Linux file system test script
Section 1. A zseries Linux file tem test script 1.1 Overview I was presented with a question regarding disk space efficiency, small files and block sizes with ext3 file tems on zseries Linux. I decided
More information2 Setting up the RDMA Framework for Development
Spring Term 2015 ADVANCED COMPUTER NETWORKS Project P1: Introduction to RDMA Programming Assigned on: 16 April 2015 Due by: 29 April 2015, 23:59 1 Introduction The goal of this project is to give an introduction
More informationChapter 9. Shell and Kernel
Chapter 9 Linux Shell 1 Shell and Kernel Shell and desktop enviroment provide user interface 2 1 Shell Shell is a Unix term for the interactive user interface with an operating system A shell usually implies
More informationINd_rasN SOME SHELL SCRIPTING PROGRAMS. 1. Write a shell script to check whether the name passed as first argument is the name of a file or directory.
1. Write a shell script to check whether the name passed as rst argument is the name of a le or directory. Ans: #!/bin/bash if [ -f $1 ] echo "$1 is a le" echo "$1 is not a le" 2. Write a shell script
More informationAdvanced Unix Programming Module 03 Raju Alluri spurthi.com
Advanced Unix Programming Module 03 Raju Alluri askraju @ spurthi.com Advanced Unix Programming: Module 3 Shells & Shell Programming Environment Variables Writing Simple Shell Programs (shell scripts)
More informationOPS235. Linux File Systems Partitioning Mounting File Systems
OPS235 Linux File Systems Partitioning Mounting File Systems 1 Lab 4 Part 1 Topics Linux File Systems (ext2 / ext3 / ext4) Linux Partitioning / Formatting Mounting Linux File Systems 2 Linux File Systems
More informationMethod of Procedure to Upgrade RMS OS to Red Hat Enterprise Linux 6.7
First Published: November 20, 2015 Contents Scope of MOP... 4 Release Components... 4 Pre Requisites... 4 Assumptions... 4 Process Information... 5 Upgrade Timing... 5 Requirements... 5 Pre Maintenance...
More informationSome useful UNIX Commands written down by Razor for newbies to get a start in UNIX
Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX 15th Jan. 2000 / 3:55 am Part 1: Working with files and rights ------------------------------------- cp
More informationEmbedded Linux. A Tour inside ARM's Kernel
Embedded Linux A Tour inside ARM's Kernel Contents 1. Shell basics 2. Introduction to Embedded Linux 3. Kernel Programming for Module / Driver Installation 4. Module / Device Driver in RPi 5. Cross Compiling
More information1 Installation (briefly)
Jumpstart Linux Bo Waggoner Updated: 2014-09-15 Abstract A basic, rapid tutorial on Linux and its command line for the absolute beginner. Prerequisites: a computer on which to install, a DVD and/or USB
More informationfor Cloud Computing University of Washington Tacoma Fall
TCSS 562: Software Engineering School of Engineering and Technology for Cloud Computing University of Washington Tacoma Fall 2018 http://faculty.washington.edu/wlloyd/courses/tcss562 Tutorial 3 Introduction
More informationShell Control Structures
Shell Control Structures CSE 2031 Fall 2010 27 November 2010 1 Control Structures if else for while case (which) until 2 1 if Statement and test Command Syntax: if condition command(s) elif condition_2
More information3 Connection, Shell Serial Connection over Console Port SSH Connection Internet Connection... 5
Contents 1 Description 2 2 Supported Devices 3 3 Connection, Shell 4 3.1 Serial Connection over Console Port...................... 4 3.2 SSH Connection................................. 4 3.3 Internet Connection...............................
More information1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words
More Linux Commands 1 wc The Linux command for acquiring size statistics on a file is wc. This command provides the line count, word count and number of bytes in a file. Open up a terminal, make sure you
More informationProject 3: An Introduction to File Systems. COP4610 Florida State University
Project 3: An Introduction to File Systems COP4610 Florida State University 1 Introduction The goal of project 3 is to understand basic file system design and implementation file system testing data serialization/de-serialization
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI
More informationHard Drive Introspection
Hard Drive Introspection Serge Y. Stroobandt Copyright 2013 2017, licensed under Creative Commons BY-NC-SA TODO binding text Introduction Not so long ago, I came across a badly configured laptop hard drive.
More information