Latest LQ Deal: Linux Power User Bundle
Go Back > Blogs
User Name



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)
function getabspath {
	local -a T1 T2
	local -i I=0
	local IFS=/ A

	case "$1" in
		read -r -a T1 <<< "$1"
Senior Member
Posted in Howtos
Views 2703 Comments 0 konsolebox is offline

Libreoffice needs change

Posted 07-07-2011 at 12:11 AM by William (Dthdealer) (Whaling the FOSS) and LibreOffice are massive ( and possibly monolithic ) suites of software. In some ways this makes them just as bad as Microsoft office, but they gain back their credit for being designed with user priority over commercial priority. I love being able to use a fully featured office suite that is more than a match for Microsoft Office, but most of the time I try to avoid having to use the suite because it is large, slow and sometimes unwieldy.

My first and foremost...
Views 1172 Comments 2 William (Dthdealer) is offline

Auto start a service at boot up.

Posted 07-06-2011 at 10:32 PM by brave heart

List all service name started at boot time
chkconfig --list
Turn on linux service at boot time
chkconfig httpd on
Turn off linux service at boot time
chkconfig httpd off
chkconfig --add snmpd
chkconfig --level 345 snmpd on
Posted in Uncategorized
Views 957 Comments 0 brave heart is offline

RuntimeError: maximum recursion depth exceeded

Posted 07-06-2011 at 11:55 AM by rocket357 (Musings on technology, philosophy, and life in the corporate world)
Updated 07-10-2011 at 06:49 PM by rocket357

Ok, so this is another philosophy post (sorry for the misleading title...if you're playing around with recursion in Python I should hope you know how to fix the error message in the title =)

Anyhow, I posted yesterday about determinism and free will. Today I'm going to follow up with the mind. In contemporary knowledge, the mind is roughly equivalent to the "meta-brain"...the activity that takes place "within" the brain. Since the dawn of time people have wondered...
Posted in Uncategorized
Views 6583 Comments 2 rocket357 is offline

The journey in Linuxville continues

Posted 07-06-2011 at 08:42 AM by ichase

December of 2010, I wrote my first blog about my thoughts in choosing a distro. It was called Linuxville
I read this blog again just recently and realized how much I have learned since writing it. I by no means consider myself an expert as in the grand scheme of things I have still only scratched the surface of the many things there are to learn when it comes to Linux.
In my original blog, I mentioned that I would like to eventually live in the Arch house but was intimidated by the...
Posted in Uncategorized
Views 547 Comments 0 ichase is offline


All times are GMT -5. The time now is 09:31 PM.

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