Q: Change permission from ----------
to -rw-rw—wx
.
One answer:
chmod ug+rw filename
chmod o+wx filename
Q Did editing the information in the link change the information in the original?
A: Yes.
Q: What happens to a symbolic link when we move whatever its pointing to?
A: it breaks.
Q: Is the link re-activated?
A: yes.
Command to grep all lines with chr1 and send to other file.
ex:
grep "chr1" sample_1.sam > chr1.txt
grep "chr1" sample_1.sam | wc -l
samtools view outbam.bam | grep "CATCATCAT" | wc -l
Task 1:
grep "^@" sample_1.sam > at.txt
Task 2:
grep "[0-9]\{3\}$" sample_1.sam
sed 's/chr1/chr2/' sample_1.sam > sample_2.sam
for f in *.sam; do mv $f ${f/.sam}.bam; done
End of document