It does work, but you need to be somewhere else (not in the directory you use it from, since on its own their's no chance to give the link another name):
I'm trying to delete lines from a large text file using VI.
Every line that I am wanting to delete start with 'S' - all others do not. (A list of users)
I've tried using * but doesn't seem to like it...any ideas...
Doesn't have to be VI - but I'm better with VI than sed/awk. (8 Replies)
when writing a shell script (bourne) and using a unix command like 'ls' is there anything special you need to do to use a wildcard (like *)? (3 Replies)
ok, I'm trying to write a script file that lists files with specific elements in the name into a txt file, it looks like this
ls s*.dat > file_names.txt
can't figure out whats wrong with that line, any ideas?
thanks in advance (10 Replies)
Hello
i am trying to use the wildcards with the if statement but it is displaying the error like this one
if * | ** | * ]
Any body can help me to for using the wild card option in the if case but i have used this code and working well with the case statement to enter the name without the... (14 Replies)
Hi All
Please excuse another straightforward question. When creating a tar archive from a directory I am attempting to use wildcards to eliminate certain filetypes (otherwise the archive gets too large). So I am looking for something along these lines.
tar -cf archive.tar * <minus all *.rst... (5 Replies)
These 2 websites do a GREAT job of explaining different types of wildcards. I learned about the categories of characters which I never knew about at all.
GNU/Linux Command-Line Tools Guide - Wildcards
GREP (1 Reply)
I'm trying to delete everything between ( and ) in a line, ie: ( start xxxx, end xxx ). there is uppercase, lowercase and numbers in the parans. and are of varied length.
I tried this:
sed 's/()//' infile > outfileI'm not understanding the wildcard use in brackets (2 Replies)
Hello everyone. My first time posting here.
I have a question that may seem very insignificant to some but is one that I've been trying to address for the past several days (haven't had any luck looking online).
I'm trying to clean a directory by removing old files that we no longer need.... (2 Replies)
Hello:
I have a very basic question. I'd like to select all files except for one file. For example, say I want to move all of the files in my current directory to a subdirectory called archive, I would use mv ./* archive/ But what if I want to move all files except for README.txt? Is there an... (19 Replies)
Hi, I'm new to Unix, but have a directory which has many files in it, well over 1000. The files are called :
M07GO.STOPE0001
M07GO.STOPE0002
M07GO.STOPE0003
M07GO.STOPE0004
etc...
I would like to rename them to the following :
M070001.bin
M070002.bin
M070003.bin
M070004.bin
etc....... (4 Replies)
Discussion started by: rnmuk
4 Replies
LEARN ABOUT DEBIAN
mustache
MUSTACHE(1) Mustache Manual MUSTACHE(1)NAME
mustache -- Mustache processor
SYNOPSIS
mustache <YAML> <FILE>
mustache --compile <FILE>
mustache --tokens <FILE>
DESCRIPTION
Mustache is a logic-less templating system for HTML, config files, anything.
The mustache command processes a Mustache template preceded by YAML frontmatter from standard input and prints one or more documents to
standard output.
YAML frontmatter beings with --- on a single line, followed by YAML, ending with another --- on a single line, e.g.
---
names: [ {name: chris}, {name: mark}, {name: scott} ]
---
If you are unfamiliar with YAML, it is a superset of JSON. Valid JSON should work fine.
After the frontmatter should come any valid Mustache template. See mustache(5) for an overview of Mustache templates.
For example:
{{#names}}
Hi {{name}}!
{{/names}}
Now let's combine them.
$ cat data.yml
---
names: [ {name: chris}, {name: mark}, {name: scott} ]
---
$ cat template.mustache
{{#names}}
Hi {{name}}!
{{/names}}
$ cat data.yml template.mustache | mustache
Hi chris!
Hi mark!
Hi scott!
If you provide multiple YAML documents (as delimited by ---), your template will be rendered multiple times. Like a mail merge.
For example:
$ cat data.yml
---
name: chris
---
name: mark
---
name: scott
---
$ cat template.mustache
Hi {{name}}!
$ cat data.yml template.mustache | mustache
Hi chris!
Hi mark!
Hi scott!
OPTIONS
By default mustache will try to render a Mustache template using the YAML frontmatter you provide. It can do a few other things, however.
-c, --compile
Print the compiled Ruby version of a given template. This is the code that is actually used when rendering a template into a string.
Useful for debugging but only if you are familiar with Mustache's internals.
-t, --tokens
Print the tokenized form of a given Mustache template. This can be used to understand how Mustache parses a template. The tokens are
handed to a generator which compiles them into a Ruby string. Syntax errors and confused tags, therefor, can probably be identified
by examining the tokens produced.
INSTALLATION
If you have RubyGems installed:
gem install mustache
EXAMPLES
$ mustache data.yml template.mustache
$ cat data.yml | mustache - template.mustache
$ mustache -c template.mustache
$ cat <<data | ruby mustache - template.mustache
---
name: Bob
age: 30
---
data
COPYRIGHT
Mustache is Copyright (C) 2009 Chris Wanstrath
Original CTemplate by Google
SEE ALSO mustache(5), mustache(7), gem(1), http://mustache.github.com/
DEFUNKT May 2010 MUSTACHE(1)