Reputation
1,598
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 9 12
Newest
 Yearling
Impact
~248k people reached

  • 0 posts edited
  • 0 helpful flags
  • 136 votes cast
Feb
6
comment using ls in bash
I think everyone is confused about what the OP wants, including me. But he talks about the index being greater than 2, not 20. To which there are simple answers, including my addition to your overall reply.
Feb
6
comment using ls in bash
Jai_s gave you the best answer
Feb
6
comment RaspberryPi- Bash entry explanation
@Nazifa, it is customary to "accept" the answer if this answers your query.
Feb
6
comment using ls in bash
As I understand it the OP wants to skip the first two files in his sorted set, so with your method, is there a better way than set -- $(echo a* | sort -n), followed by shift;shift?
Feb
6
comment Find size of file in unix using for loop
@Raj, just use the stat command stat -c %s <filename>
Jan
9
awarded  Yearling
Nov
18
comment How to call bash function from within awk?
I use gawk (GNU awk) and it seems to be POSIX compliant, see awk(1) - Linux man page, look for command |
Nov
17
comment How to call bash function from within awk?
Sorry just closed my laptop, so not sure if it is posix. Look up getline in the info/manpage it is the internal awk function to read a line. You can either read from the awk input, from a different file or from a command.
Nov
17
comment How to call bash function from within awk?
No, the system() command just executes the command in a subshell and returns to awk, the output of that command may even be mangled with the output of your awk script in some funny cases unless you use fflush("/dev/stdout"). If you need to parse the output of the command you need to use the | getline syntax.
Nov
17
answered How to call bash function from within awk?
Nov
17
answered Match lines beginning with the same pattern in two text files
Nov
17
comment How can I use (sed|awk) to mask an e-mail address with asterisks like <j******e@g***.com>
I guess to truly answer the original poster you need a slight tweak: (.@.), plus I'm not sure the \..* is good enough in case there are subdomains.
Nov
17
answered How can I use (sed|awk) to mask an e-mail address with asterisks like <j******e@g***.com>
Nov
17
comment GREP - pattern match from file only returning on last pattern in the list
@Steve, since this answers your question, you should mark the answer accepted.
Nov
17
comment How can I delete everything until a pattern and everything after another pattern from a line?
Good answer, but you don't need the ^ or $ since sed will try and find the longest match. Also you may have missed the dot after elit, you could insert \. if necessary.
Nov
17
comment Find command: multiple conditions
I would not suggest -delete, but hey this is the more comprehensive answer. Maybe use -print or -exec ls -al {} +
Nov
17
answered How to extract part of the line from the file
Oct
4
comment How to get infrared image data with sane on an epson v700 scanner?
Wow, thank you. I will need to test it before I mark your answer as accepted, but this sounds good (no time for the next couple of months). But how do you activate the frame type? Would you have a pointer to the right part of the help/man pages?
Mar
1
comment use backquotes in a script
The question seems very clear to me and perfectly answered by Ariel.
Mar
1
answered Spaces next to pipes