Share your knowledge at the LQ Wiki.
Go Back > Blogs > GlennsPref
User Name


Rate this Entry

How to save your rpm's for future reuse in Mandriva. p10 of 10

Posted 05-12-2010 at 01:23 AM by GlennsPref

	Now the reason I written this is because of a sed trick I found that converts the list to
 something urpmi can work with, This process is not completed yet, more things will occur to me as
 time rolls on, 

echo "Create a space-separated-list from top-down list with preceeding chars." 
cd ~/build 

echo "remove old files" 
rm -f ~/build/file2.txt 
rm -f ~/build/file3.txt 

echo "Remove -  (dash space) from lead of lines using sed...." 
echo "sed 's/^[-\ ]*//' file1.txt (from file1.txt in pwd dir)" 

echo "redirect output to new file...file2.txt" 
sed 's/^[-\ ]*//' file1.txt > file2.txt 

echo "Now replace carriage returns with a space... using file2.txt, create file3.txt" 
sed ':a;N;$!ba;s/\n/ /g' file2.txt > file3.txt
First it removes the old files, to save stopping for errors, file exists. Then it removes the dash space from the head of the lines... And lastly it replaces the newline char with a space, bringing all the list to one line, sweet! I'd like to reference where most of my info came from, MDE repo and SoS repo (website down atm), help files... Few years old now but still very useful. And that's IT! Any questions? Did I miss something? Please ask!
Regards Glenn.
Posted in Uncategorized
Views 1189 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 02:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration