Thread: editing my .bashrc to simplify a command
hi, want write little bit of code make easier word wordnet (the "wn" command) , add vocab list.
in other words, instead of typingdefinitions word "filibuster" , add vocab.txt, want able typecode:wn filibuster -over && wn filibuster -over >> vocab.txt, have know do.code:d filibuster
tried adding .bashrc:
but doesn't seem working. i've never written scripts before, don't know i'm doing wrong (or not doing). appreciated.code:d() { wn "$" -over && wn "$" -over >> vocab.txt }
edit: never mind, figured out. apparently have use "${1}" instead of "$".
first, why running command twice? if goal both put output file , see on console, i'd suggest using tee (see below).
second, want replace "$" "$1".
code should be:
edit: ah, see figured out.code:d() { wn "$1" -over |tee -a vocab.txt }
see if works.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] editing my .bashrc to simplify a command
Ubuntu
Comments
Post a Comment