måndag 6 april 2015

linux -debian - apt sources.list add # on every lie but local ppa and remove # on every line

Sätter # On/Off på alla rader i /etc/apt/sources.list förutom local ppa


# chmod u=rwx,g=rx,o=r comment-sources.sh
# add # on every Line - But not on Local repo ppa


#!/bin/bash
sed 's/^/#/' /etc/apt/sources.list
sed 's/#deb file:/deb file:/' /etc/apt/sources.list

# chmod u=rwx,g=rx,o=r ucomment-sources.sh
# Delete # on every line But not local repo ppa


#!/bin/bash
sed s/^#// /etc/apt/sources.list >/etc/apt/sources.bak
mv /etc/apt/sources.bak /etc/apt/sources.list

Inga kommentarer: