LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 08-24-2011, 05:28 PM   #1
SlowLearner
LQ Newbie
 
Registered: Dec 2002
Location: Florida
Distribution: Slackware 13.1
Posts: 28
Blog Entries: 1

Rep: Reputation: 1
Question Dansguardian.config edit using perl or sed


DansGuardian Wiki FAQs says:

Quote:
Usage #26. There was a bug in DansGuardian versions 2.9.9.1 through 2.10.0.2 (but not 2.9.9.0 and before, or 2.10.0.3 and after) that caused list lines containing an invisible TAB character to be mis-parsed. That caused all kinds of weird and wonderful behaviors, including what appeared to be the exact same line behaving differently when retyped, and lines being sensitive to the presence of comments! (Use something like dansguardian -v to find out the DansGuardian version, which isn't always the same as the package version.)

To solve the problem do any one of:

Edit the list files to use only SPACEs never TABs.
Convert all existing TABs to the right number of SPACEs (maybe use something like sed or Perl).
Upgrade to at least DansGuardian 2.10.0.3
Since this is only my first miserable attempt at installing a slackbuild and i have zero experience creating my own. Upgrading to DansGuardian 2.10.0.3 seems beyond my ability at the moment. Does anyone on here have the ability to easily "Edit the list files to use only SPACEs never TABs.
Convert all existing TABs to the right number of SPACEs (maybe use something like sed or Perl)"??
 
Old 08-24-2011, 08:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
The question would be: what do they consider to be "the right
number of spaces"?

You could load the file in emacs, for example, and 'untabify',
or vim, if you prefer ;}


With sed (assuming e.g. a standard tab width of 8)
Code:
sed -i 's/\t/        /g' file

Last edited by Tinkster; 08-24-2011 at 08:53 PM.
 
1 members found this post helpful.
Old 08-24-2011, 10:49 PM   #3
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,692

Rep: Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987
You could also have a look at the expand command
 
  


Reply

Tags
dansguardian, perl, sed, slackbuild


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do you use sed to edit a file? SparceMatrix Linux - General 3 09-04-2010 04:13 PM
using sed to edit html tkeyser Programming 6 08-20-2009 08:15 PM
SED: edit ip address n1wil Linux - Software 4 01-08-2008 03:18 PM
help to edit Edit my bootloader's config file from kernel prompt jagdishpandey Linux - Kernel 5 07-03-2007 07:59 AM
Suse 9.3 yast2 hangs saving boot config or edit config deh6 Suse/Novell 0 07-16-2006 04:43 PM


All times are GMT -5. The time now is 09:47 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