Tag Info

New answers tagged

1

One way that works is via the menu configuration.. Mouse right-click on the menu button and click Configure..: Click Open the menu editor: Within the opened editor, go to the application of interest and open Properties where additional information can be added to the Comment box: Now, searching for this comment is possible via the search box: ...


1

With awk you could also run: find . -type f -exec awk 'BEGIN{cx=0; cy=0}; /FIND/{cx++} /ME/{cy++}; END{if (cx > 0 && cy > 0) print FILENAME}' {} \; It uses cx and cy to count for lines matching FIND and respectively ME. In the END block, if both counters > 0, it prints the FILENAME. This would be faster/more efficient with gnu awk: find . ...


1

In fact a simplified form of that command works: catfish --path=%f In Thunar, go to Edit - Configure custom actions, and edit the Search action.


0

I don't know is there a possible solution for lxpanel, but you can have a menu like that with Whisker Menu in Xfce panel. Just install the package xfce4-whiskermenu-plugin then start xfce4-panel and add Whisker Menu. The package depends on some Xfce's packages, but I guess they worth it.


4

Running apropos '^system' works for me, returning the list of man pages where either the page name itself starts with system or the one line description starts with system. For example, the output on Debian (jessie) includes: system-config-printer (1) - configure a CUPS server sigset (3) - System V signal API I know of no clean way to tell apropros to ...


2

The apropos command searches both names and descriptions. But results could be filtered: apropos system | grep "^system"


3

n=$some_num { head -n"$(($(wc -l <in)-n))" >/dev/null grep 'match your string' } <in Unfortunately this requires reading the file entirely through w/ wc to get a line-count because it's not clear otherwise how many lines are in the file or how large $n is. That aside, this should be a very performant solution provided <in is a regular, ...


2

You can do that with awk and a little bit of help: $ N=8 $ awk -v start_line="$(( $(wc -l < alphabet) - N + 1 ))" 'NR>=start_line && /e/' alphabet sierra whiskey yankee $ finds all lines containing e in the last 8 lines of the phonetic alphabet.  This has the drawback that it reads the entire input file twice.


4

If your shell supports it (zsh, bash, some implementations of ksh), you could utilise process substitution grep <pattern> <(tail -n5 yourfile.txt) Where -n5 means get the five last lines. Similarly, grep <pattern> <(head -n5 yourfile.txt) would search through the 5 first lines of yourfile.txt. Explanation Simply speaking, the ...


2

Why do you want to avoid pipe? If you really want to avoid pipe, then you will have to run two commands: tail -N filename > filename.tmp grep "string" filename.tmp (when N is the last number of lines)


0

Try PathPicker. PathPicker is a simple command line tool that solves the perpetual problem of selecting files out of bash output. Installation From examples: git status | fpp grep -r "FooBar" . | fpp find . -iname "*.js" | fpp Use the -ko option if you want go back to the list: -ko, --keep-open keep PathPicker open once a file ...



Top 50 recent answers are included