LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-05-2014, 08:43 AM   #1
rogan
Member
 
Registered: Aug 2004
Distribution: Slackware
Posts: 216

Rep: Reputation: 117Reputation: 117
slackpkg check-updates


Hello fellow slackers.
I have a small problem regarding the output of slackpkg check-updates.
I run the command above as a cron job and I'm mailing the output to root, but I cant open it in mailx which claims it has binary content.

If I run slackpkg check-updates >tmp and then open tmp in pico I get this:
No news is good news
^[[?12l^[[?25h

I suppose the characters on the second line is the problem...
Should I filter them out or what gives ?
 
Old 01-05-2014, 02:13 PM   #2
Lirey
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 39

Rep: Reputation: 12
It appears that the slackpkg script is hiding the cursor while running and that control sequence in the output file is what makes it visible again. I suspect that the real problem is the control sequence to hide the cursor.

The script probably needs to be fixed/tweaked to work better when the output is sent to a file or another script, but the easy and quick solution is to filter the output doing something like:

slackpkg check-updates | grep -i news > tmp
 
Old 01-05-2014, 02:40 PM   #3
rogan
Member
 
Registered: Aug 2004
Distribution: Slackware
Posts: 216

Original Poster
Rep: Reputation: 117Reputation: 117
Talking

That works!
Thanks a bunch

Edit:
I found a way to remove all non-alphanumeric chars with sed.
Problem solved

Last edited by rogan; 01-05-2014 at 03:24 PM.
 
  


Reply


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] Slackpkg .... download updates first before upgrading? barry_lamb Slackware 2 04-02-2013 01:17 PM
Slackpkg going backwards trying to rerun updates in current? damgar Slackware 2 04-01-2010 10:00 PM
Best way to roll back from slackpkg updates? enine Slackware 11 03-09-2010 12:42 AM
[SOLVED] slackpkg + security updates vttay03 Slackware 6 01-09-2010 02:03 PM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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