echo a b c d
a b c d
echo !:2
b
If you press tab after !:2, it is expanded to 2nd argument from the previous command.
Print columns 1 and 3
echo "x:y:z#a:b:c" | awk 'BEGIN {RS="#";FS=":"} {print $1,$3}'
x z
a c
| #!/bin/bash | |
| pid=$1 | |
| me="$(basename $0)($$):" | |
| if [ -z "$pid" ] | |
| then | |
| echo "$me a PID is required as an argument" >&2 | |
| exit 2 | |
| fi | |
| name=$(ps -p $pid -o comm=) |
| name: np | |
| channels: | |
| - defaults | |
| dependencies: | |
| - bokeh=0.12.13=py36h2f9c1c0_0 | |
| - ca-certificates=2017.08.26=h1d4fec5_0 | |
| - certifi=2018.1.18=py36_0 | |
| - cffi=1.11.4=py36h9745a5d_0 | |
| - click=6.7=py36h5253387_0 | |
| - cloudpickle=0.5.2=py36h84cdd9c_0 |
| { | |
| "image_index": 0, | |
| "program": [ | |
| { | |
| "inputs": [], | |
| "function": "scene", | |
| "value_inputs": [] | |
| }, | |
| { | |
| "inputs": [ |
| { | |
| "split": "train", | |
| "image_index": 0, | |
| "image_filename": "CLEVR_train_000000.png", | |
| "directions": { | |
| "right": [ 0.6563112735748291, 0.7544902563095093, -0.0 ], | |
| "behind": [ -0.754490315914154, 0.6563112735748291, 0.0 ], | |
| "above": [ 0.0, 0.0, 1.0 ], | |
| "below": [ -0.0, -0.0, -1.0 ], | |
| "left": [ -0.6563112735748291, -0.7544902563095093, 0.0 ], |
| import logging | |
| def foo(): | |
| lfoo = logging.getLogger('abc') | |
| lfoo.info('Foo: message') | |
| def bar(): | |
| lbar = logging.getLogger('abc') | |
| lbar.info('Bar: message') |
File structure
├── app.js
├── index.html
├── lib
│ ├── modules
│ │ └── template.js
│ ├── require.js
│ └── underscore.js
| *.aux | |
| *.glo | |
| *.idx | |
| *.log | |
| *.toc | |
| *.ist | |
| *.acn | |
| *.acr | |
| *.alg | |
| *.bbl |
| object OptListFlatten { | |
| /////////////// | |
| val aList = List(Some(10), None, Some(20)) | |
| for { | |
| x <- aList | |
| if (x.isDefined) | |
| } yield { | |
| x.get | |
| } | |
| //------------- |