LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Slacking with Slackware

Posted 12-01-2011 at 08:11 AM by ofaring (Debian, This That and the Other)
Updated 12-01-2011 at 08:14 AM by ofaring

Ok. I've used Debian for quite some time -- although I started with Slackware years back -- and it's been awhile since I attempted anything without a package manager!

I grabbed a copy of Slackware Disc 1 and installed a basic, console-only Slackware.

First snag...WiFi. I live in a busy neighbourhood full of students eager to grab "free" internet off a WEP-encrypted wireless router, so WPA is a must. Well, /etc/rc.d/rc.inet1.conf didn't seem very happy to play...
Member
Posted in Examples, Slackware
Views 886 Comments 0 ofaring is offline
Old

Comment a block in shell

Posted 08-31-2011 at 12:22 AM by hi2arun
Tags bash, script

We all know, to comment out a line in shell script, '#' token is inserted in the line that needs to be made dead.
Eg:

Code:
# This is a dead line
echo "This line is live"
However, '#' token can be pesky if a block of lines need to be commented out.
Say, to comment out the following block using '#'

Code:
# comment starts here
# All these lines
# are blocked
# using '#' token
# ...
# ...
# ...
...
Member
Posted in Uncategorized
Views 775 Comments 0 hi2arun is offline
Old

"Wait until a process ends, a download ends, or a file conversion ends, then do X"

Posted 08-30-2011 at 03:06 PM by the dsc (linux-related notes)
Updated 08-30-2011 at 09:41 PM by the dsc (a small improvement)

Sometimes you want the computer to shut down after you've finished downloading something or converting some large file into some other format, but you want to go out or go to sleep instead of waiting and checking for it yourself.

For these situations I've come up with two tiny scripts. The first one waits until a file hasn't changed its size on three consecutive intervals of twenty seconds:

Code:
a=0 ; file="$1" ; if [ -f "$file.part" ] ; then file="$file.part"
...
Member
Posted in Uncategorized
Views 756 Comments 0 the dsc is offline
Old

How hard could it be? A login manager in BASH

Posted 07-11-2011 at 08:34 PM by William (Dthdealer) (Whaling the FOSS)

As I have previously elaborated, I hat the Gnome Login Manager. To summarise: it is bulky and slow.

I am currently using SLim as my login manager, for it is fast and very customisable. It however lacks a few features I want:
  1. Render of the date and time
  2. An easy way to receive a list of configured commands to for example, turn the computer off ( from now written as 'power commands' )
  3. UI elements to allow the user to turn the computer off without having to first login

...
Member
Views 2105 Comments 0 William (Dthdealer) 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 1730 Comments 0 konsolebox is offline

  



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

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