LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 07:43 AM   #1
rogan
Member
 
Registered: Aug 2004
Distribution: Slackware
Posts: 30

Rep: Reputation: 8
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, 01:13 PM   #2
Lirey
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 32

Rep: Reputation: 5
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, 01:40 PM   #3
rogan
Member
 
Registered: Aug 2004
Distribution: Slackware
Posts: 30

Original Poster
Rep: Reputation: 8
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 02: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 12:17 PM
Slackpkg going backwards trying to rerun updates in current? damgar Slackware 2 04-01-2010 09:00 PM
Best way to roll back from slackpkg updates? enine Slackware 11 03-08-2010 11:42 PM
[SOLVED] slackpkg + security updates vttay03 Slackware 6 01-09-2010 01:03 PM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 05:16 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
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