航站楼有这样的标志
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-------------+-----------+---------+-------+-----------------------
newdb | newdb_owner | SQL_ASCII | C | C |
postgres | postgres | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | SQL_ASCII | C | C | postgres=CTc/postgres+
| | | | | =c/postgres
请告诉我如何使用sed
.
如果用途
sed
不是目的:cut -s -d "|" -f 1-2 --output-delimiter=" " testfile | tail -n +2 | grep -E '\S'
awk最适合表格数据
awk -F'|' 'NR>3 && !/^ /{print $1,$2}'
使用 Postgresql 本身的强大功能。正确编写 SQL 查询就足够了,例如:
以获得所需的信息。