LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-02-2023, 08:36 PM   #1
samiscool51
LQ Newbie
 
Registered: Jan 2023
Posts: 2

Rep: Reputation: 0
strange behavior when tar is trying to extract multiple files with a BLFS command.


i've been trying to extract the archives for the Xorg Libraries section of the systemd edition BLFS 11.2 book and for some reason when i type:

Code:
for package in $(grep -v '^#' ../lib-7.md5 | awk '{print $2}'); do packagedir=${package%.tar.?z*}; tar -xf $package; done
(i shortened it during troubleshooting to try and nail down the problem)

the command returns the archives but with \r appended to the output:
e.g:
Code:
tar: libxkbfile-1.1.0.tar.bz2\r: cannot open: No such file or directory
i thought i typed it wrong and checked that i typed it correctly and i did, i even got a friend to double check for me that i typed it correctly.
thinking that grep, tar, gawk or bash wasn't working correctly i recompiled them, double checked that they weren't spitting out any errors or warnings that needed attention and reinstalled them.

unfortunately they all returned without errors and the re-installation didn't fix the problem.

so i need help, i've gone though all the problems i think it could be having and i have no idea where it's getting /r from.
 
Old 11-03-2023, 08:28 PM   #2
samiscool51
LQ Newbie
 
Registered: Jan 2023
Posts: 2

Original Poster
Rep: Reputation: 0
tr -d '\r' < INPUTFILE > OUTPUTFILE
 
Old 11-04-2023, 11:05 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by samiscool51 View Post
tr -d '\r' < INPUTFILE > OUTPUTFILE
This is a fix but best to explain why as well, in this case looks like windows endings ( you shouldn't use windows to edit linux text as you will end up with the wrong line endings, ie \n\r instead of just \b ).
 
  


Reply



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
Alter command to extract iso content , tar cf - . | (cd /tmp/testiso_temp; tar xfp -) andrewysk Linux - Newbie 5 04-06-2021 02:35 AM
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
How do I un tar a .tar, .tar.z, .tar.gz file vofkid Linux - Newbie 4 03-15-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:49 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
Open Source Consulting | Domain Registration