Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Consider the following command:
elinks -dump file.html
It will print the file, formatted as plain text (without HTML tags).
The file.html is constantly updated and I want to run it through "tail -f like this:
tail -f file.html | elinks -dump
However it's not working. Any ideas?
tail -f only prints lines which are newly added to the end of the file.
If you want to check the output of the command in certain intervalls, watch can do that:
watch elinks -dump file.html
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I tried searching in here, but it's seems there is only commands that helps to delete blank lines in text file.
Is there a linux bash script that I can execute to delete blank lines in any text file I want ?
Replace file.txt with the name and path to your file and run this command in the shell:
sed -i '/^$/d' file.txt
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Guys What is a more efficient way of doing the following using auto-complete?
cd
ls
cd bar
ls
cd baz
ls
cd basilio
Try ls -R from the outermost folder, that will recursively list all content.
You haven't specified in which SHELL. In BASH you can do double-tab to see what are your options:
cd [TAB] [TAB] type first few letters [TAB] to complete.
Similar - but better - completion is implemented in ZSH.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am using below command to get the detailed list of files in each archive in a particular directory. unzip -l ".zip". But the problem with this command is that it is enlisting all the files in the archive. I want to limit the number of files to be listed to 5 per archive.
I am using ssh. Thanks.:)
you can either use head or tail to limit the top n line or bottom n line
unzip -l a.zip | head -n 5
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Wanting to remember some impotant cmds, I used to put them in .bashrc_history file and use search to find, like:
$ history | grep alias | grep coffee | grep code
but sometimes history may lost for some reason. Also, usually several terminals, which may rewrite the history.. So is there any tool to manage?
Put this into your ~/.bashrc and re-login (or source the ~/.bashrc)
prompt_command() {
history | sed '$!d' >> /path/to/some/file
}
PROMPT_COMMAND=prompt_command
Now every command you type will be appended to /path/to/some/file immediately after you type it
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I just reformated my HD and had to overwrite my /home partition. Everything is fine in Linux Mint 11.
Except that the command stack recall with cursor up/down displays repeats of the same command.
Like:
ls
ls
ls
cd ~
should be:
ls
cd ~
Any ideas how to fix this?
Assuming you're using bash:
export HISTIGNORE="&"
I assume you're using bash.
Add this to to your ~/.bashrc
HISTCONTROL=ignoreboth