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

Notices


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 704 Comments 0 konsolebox is offline
Old

PlayShell 0.2-WP10

Posted 04-01-2012 at 03:23 AM by konsolebox

PlayShell 0.2-WP10 was released today.

page: http://playshell.sourceforge.net/
files: http://sourceforge.net/projects/play...hell/0.2-WP10/
Senior Member
Posted in Projects
Views 627 Comments 0 konsolebox is offline
Old

Bash functions to list and kill or send signals to process trees

Posted 03-31-2012 at 11:54 PM by konsolebox
Updated 07-28-2014 at 11:39 AM by konsolebox

These functions can be used in scripts or interactive shells to manipulate process trees. At least bash version 3.0 is needed. May also work with some earlier versions.

killtree - Creates a list of processes based from a parent process ID first then sends the signal to all of them synchronously.

killtree2 - Same as killtree but it doesn't create a list first. It immediately kills processes as it goes through every level.

killtree3 - This version kills...
Senior Member
Posted in Howtos
Views 2254 Comments 0 konsolebox is offline
Old

Getting Absolute Paths of UNIX Directories and Filenames in Shell Scripts

Posted 07-08-2011 at 03:05 AM by konsolebox
Updated 07-17-2011 at 09:11 AM by konsolebox
Tags bash, ksh, script, shell, zsh

This post is a compilation of the function getabspath() for different shells that can be used to get the absolute form of a path. The function accepts an argument path then returns the absolute form of it to the variable $__.

bash (3.0 and newer only)
Code:
function getabspath {
	local -a T1 T2
	local -i I=0
	local IFS=/ A

	case "$1" in
	/*)
		read -r -a T1 <<< "$1"
		;;
	*)
		read
...
Senior Member
Posted in Howtos
Views 2023 Comments 0 konsolebox is offline
Old

PlayShell 0.2-WP09

Posted 04-20-2011 at 03:15 AM by konsolebox
Updated 07-08-2011 at 02:49 AM by konsolebox

PlayShell 0.2-WP09 has been released yesterday.

page: http://playshell.sourceforge.net/
files: http://sourceforge.net/projects/play...hell/0.2-WP09/
Senior Member
Posted in Projects
Views 418 Comments 0 konsolebox is offline

  



All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration