LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 04:28 PM   #1
SlowLearner
Member
 
Registered: Dec 2002
Location: Florida
Distribution: Slackware 14.2
Posts: 57
Blog Entries: 1

Rep: Reputation: 20
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, 07:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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 07:53 PM.
 
1 members found this post helpful.
Old 08-24-2011, 09:49 PM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,008

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


Reply

Tags
dansguardian, perl, sed, slackbuild



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 03:13 PM
using sed to edit html tkeyser Programming 6 08-20-2009 07:15 PM
SED: edit ip address n1wil Linux - Software 4 01-08-2008 02:18 PM
help to edit Edit my bootloader's config file from kernel prompt jagdishpandey Linux - Kernel 5 07-03-2007 06:59 AM
Suse 9.3 yast2 hangs saving boot config or edit config deh6 SUSE / openSUSE 0 07-16-2006 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:34 AM.

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
Open Source Consulting | Domain Registration