Easy enough with sed
:
sed -n 123,230p filename
This will output filename content, from line 123 to line 230, inclusives. Notice the p
letter after the last line number, this is what instruct sed
to print to stdout.
#!/usr/bin/env bash | |
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04 | |
# | |
# _______________| noise : ambient Brown noise generator (cf. white noise). | |
# | |
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave] | |
# ^minutes can be any positive integer. | |
# Command "noise 1" will display peak-level meter. | |
# | |
# Dependencies: play (from sox package) |
// ==UserScript== | |
// @name 百度网盘aria2导出工具 | |
// @author acgotaku311 | |
// @description 一个方便吧百度网盘的Aria2rpc导出的脚本。 | |
// @encoding utf-8 | |
// @include http://*n.baidu.com/s/* | |
// @include http://*n.baidu.com/disk/home* | |
// @include http://*n.baidu.com/share/link* | |
// @include https://*n.baidu.com/s/* | |
// @include https://*n.baidu.com/disk/home* |
#!/bin/bash | |
# vim730: set tw=80 cc=+1: | |
# Bring up IPv6 through ISATAP tunnel. | |
version="1.0" | |
usage() { | |
cat <<EOF | |
USAGE: |
fn quick-sort [li]{ | |
if <= (count $li) 1; then | |
put $@li | |
else | |
quick-sort [(each { if <= $0 $li[0]; then put $0; fi } $li[1:])] | |
put $li[0] | |
quick-sort [(each { if > $0 $li[0]; then put $0; fi} $li[1:])] | |
fi | |
} |
import time | |
from telethon import InteractiveTelegramClient | |
from telethon.tl.types.input_peer_chat import InputPeerChat | |
from telethon.tl.functions.messages.set_typing import SetTypingRequest | |
from telethon.tl.types.send_message_typing_action import SendMessageTypingAction | |
client = InteractiveTelegramClient('session_name','+8613400000000',api_id=123456,api_hash='752f79bb39d8004006f00f761dab7f00') | |
peer = InputPeerChat(14884418) | |
act = SendMessageTypingAction() |
VOLUME_UUID=$(xmlstarlet sel -t -m "/ltfsindex" -v volumeuuid "${1}") | |
VOLUME_NAME=$(xmlstarlet sel -t -m "/ltfsindex" -v directory[1]/name "${1}") | |
xmlstarlet sel -t -m ".//file" \ | |
-o "${VOLUME_UUID}" -o "," \ | |
-o "${VOLUME_NAME}" -o "," \ | |
-v "extentinfo/extent[1]/startblock" -o "," \ | |
-v name -o "," \ | |
-v "length" -o "," \ | |
-m "ancestor-or-self::directory" -v "name" -o "/" -b -o "," \ |
find_package(Qt5Widgets REQUIRED) | |
include_directories( | |
${GR_QTGUI_INCLUDE_DIRS} | |
${GR_ANALOG_INCLUDE_DIRS} | |
${GR_FILTER_INCLUDE_DIRS} | |
${GR_BLOCKS_INCLUDE_DIRS} | |
${GR_FFT_INCLUDE_DIRS} | |
${GNURADIO_RUNTIME_INCLUDE_DIRS} | |
${QT_INCLUDE_DIRS} |
This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.
For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way
For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter
This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m