Linux Shell Scripting Tutorial v2.0.pdf


Aperçu du fichier PDF linux-shell-scripting-tutorial-v2-0.pdf

Page 1...4 5 678301




Aperçu texte


Defining functions

228

Writing functions

231

Calling functions

232

Pass arguments into a function

237

Local variable

240

Returning from a function

243

Shell functions library

245

Source command

248

Recursive function

249

Putting functions in background

251

Chapter 9 Challenges

253

Chapter 10: Interactive Scripts

254

Menu driven scripts

254

Getting information about your system

256

Bash display dialog boxes

260

Dialog customization with configuration file

263

A yes/no dialog box

267

An input dialog box

268

A password box

270

A menu box

273

A progress bar (gauge box)

276

The form dialog for input

279

Console management

281

Get the name of the current terminal

282

Fixing the display with reset

283

Get screen width and hight with tput

284

Moving the cursor with tput

284

Display centered text in the screen in reverse video

285

Set the keyboard leds

286

Turn on or off NumLock leds

286

Turn on or off CapsLock leds

287

Turn on or off ScrollLock leds

287

/etc

288
Shell scripting help

288

Recommended Books

288