How to save your rpm's for future reuse in Mandriva. p10 of 10
Posted 05-12-2010 at 12:23 AM by GlennsPref
Code:
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,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 http://www.mde.djura.org/index.html and SoS repo http://seerofsouls.com/ (website down atm), help files... Few years old now but still very useful. http://sed.sourceforge.net/sed1line.txt http://linux.dsplabs.com.au/rmnl-rem...-sam-ssam-p65/ And that's IT! Any questions? Did I miss something? Please ask!Code:#!/bin/zsh 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
Total Comments 0