Gconf browsing in mc - the file



I forgot to attach what I was writing about.
Here it is.
#! /bin/sh

# Based on previous version of lslR
# Modified by Tomas Novak <tnovak ipex cz>   April 2000
#   (to allow spaces in filenames)

mclsGConffs () {
gconftool -R / | gawk '
/ +\/.+:$/ {old=substr($1,0,length($1)-1);
	print "dr--r--r-- " "0 " "0 " "0 " "0 " "Jan 01 00:00 " old "/" "";next;}
/^\ +[^ ]+\ =\ [^ ]+/{
	    print "-r--r--r-- " "0 " "0 " "0 " "0 " "Jan 01 00:00 " old "/" $1;
	}'
}

mccoGConffs () {
    gconftool --get '/'$1 > $2 
}

mcrmGConffs () {
    gconftool --unset '/'$1 
}

mcciGConffs () {
    gconftool -t string '/'$1 -s "`cat $2`" 
}



case "$1" in
  list)    mclsGConffs ; exit $?;;
  copyout) mccoGConffs "$3" "$4" ; exit $?;;
  copyin)  mcciGConffs "$3" "$4" ; exit $?;;  
  rm)      mcrmGConffs "$3" ; exit $?;;

esac
return 1
begin:vcard 
n:Smogór;Dominik
tel;cell:+480504972727
tel;home:+48618321729
x-mozilla-html:FALSE
org:PUT;Electrical
version:2.1
email;internet:duce fanthom irc pl
title:Engineer
adr;quoted-printable:;;Czechos=B3owacka 15/9=0D=0A61-459 Poznan=0D=0APoland;Poznań;;61-459;Poland
x-mozilla-cpt:;0
fn:Dominik Smogór
end:vcard


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]