This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate-script.sh | |
# Based on an idea by Albert Reiner. | |
OUTFILE=generated.sh # Name of the file to generate. | |
# ----------------------------------------------------------- | |
# 'Here document containing the body of the generated script. | |
( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash$ cat textfile | |
This is line 1, of which there is only one instance. | |
This is the only instance of line 2. | |
This is line 3, another line. | |
This is line 4. | |
bash$ grep 'the' textfile | |
This is line 1, of which there is only one instance. | |
This is the only instance of line 2. | |
This is line 3, another line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Embedding Ctl-H in a string. | |
a="^H^H" # Two Ctl-H's -- backspaces | |
# ctl-V ctl-H, using vi/vim | |
echo "abcdef" # abcdef | |
echo | |
echo -n "abcdef$a " # abcd f | |
# Space at end ^ ^ Backspaces twice. | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
create or replace function datediff(m text,d1 date,d2 date) returns int as $$ | |
declare | |
d1_year int; | |
d1_month int; | |
d2_year int; | |
d2_month int; | |
day int; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8' ?> | |
<?xml-stylesheet type='text/xsl' href='grid.xsl' ?> | |
<all_books> | |
<book> | |
<分类号>TN01</分类号> | |
<书名>模拟电子技术</书名> | |
<作者>胡宴如主编</作者> | |
<版次></版次> | |
<出版社>高等教育出版社</出版社> | |
<出版时间>2000.8</出版时间> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
/********************************************** | |
图书管理系统 v1.0 | |
作者: 赵卫国 | |
联系方式: mlsx@cie.xtu.edu.cn http:/www.xplore.cn | |
完成时间: 2004年4月 | |
************************************************/ | |
--> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default: on | |
# | |
# description: Amanda services for Amanda server and client. | |
# | |
service amanda | |
{ | |
disable = no | |
# flags = IPv6 | |
socket_type = stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default: on | |
# | |
# description: The Amanda backup client should be enabled for systems | |
# which will be backed up by an Amanda backup server. | |
service amanda | |
{ | |
disable = no | |
flags = IPv6 | |
socket_type = stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-su-3.2$ for (( i=1;$i < =9;i++)); do amlable FileBackup FileBackup-0$i slot $i;done | |
labeling tape in slot 1 (file://yourpath/FileBackup/slots): | |
Reading label... | |
Found an empty tape. | |
Writing label FileBackup-01.. | |
Checking label... | |
Success! | |
labeling tape in slot 2 (file://yourpath/FileBackup/slots): | |
Reading label... | |
Found an empty tape. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amtape FileBackup show | |
amtape: scanning all 25 slots in tape-changer rack: | |
slot 5: time 20090413030002 label FileBackup-05 | |
slot 6: time X label FileBackup-06 | |
slot 7: time X label FileBackup-07 | |
slot 8: time X label FileBackup-08 | |
slot 9: time X label FileBackup-09 | |
slot 10: time X label FileBackup-10 | |
slot 11: time X label FileBackup-11 | |
slot 12: time X label FileBackup-12 |
OlderNewer