LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > konsolebox
User Name
Password

Notices

Old

binfind - Search for executable files based from PATH variable.

Posted 09-04-2012 at 09:51 PM by konsolebox
Tags bash, script

I've been using this utility quite long enough already. I use this to search for executable files based from the path values saved in the PATH variable.

Code:
#!/bin/bash

shopt -s extglob

function main {
	# check bash version

	[[ BASH_VERSINFO -ge 3 ]] || {
		echo "This script requires bash version 3.0 or newer."
		return 1
	}

	# check arguments

	[[ $# -eq 0 || "$1"
...
Senior Member
Posted in Howtos
Views 586 Comments 0 konsolebox is offline
Old

uuidfstab - Convert fstab contents to a format that uses UUID instead of /dev paths.

Posted 09-04-2012 at 09:09 PM by konsolebox
Updated 09-17-2012 at 01:25 AM by konsolebox
Tags bash, fstab, script, uuid

This script helps a user or admin to automatically convert items in fstab so that they would use UUIDs instead.

uuidfstab[.sh]
Code:
#!/bin/bash

function error {
	echo "$1" >&2
	exit 1
}

function show_usage_and_exit {
	error "Usage: $0 <path_to_fstab_file> [<new_fstab_file>]"
}

function process {
	local FSTABFILE=$1 NEWFSTABFILE=$2 LINE DEVICE TEMPFILE ID OUTPUTFILE
...
Senior Member
Posted in Howtos
Views 620 Comments 0 konsolebox is offline

  



All times are GMT -5. The time now is 08:39 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration