Skip to content

Tag: bash

using watch , tail and ccze together

I have used watch and tail together like this: Also I have used tail and ccze for colorizing log file as below: But I dont know how should I use all of these three together in a single command. Does any one have any idea? Answer Recent versions of watch has -c | –color option, so perhaps this will work

Difference between printf and echo in Bash

Why printf prints 5 and echo prints 6 characters? Answer First sentence of entry for echo in the bash man page (emphasis mine): Output the args, separated by spaces, followed by a newline. First sentence of the man page entry for printf: Write the formatted arguments to the standard output under the control o…

XSLT: add element, read content from file

I ran into a complicated XSLT question. Input.xml Here I want to add a new element <DESCRIPTION>. The tricky part: the content are in separate files, the file name of the description file is the : (00050802.html,00033802.html === <ID>.html). The .html contains some html code, so the content should…

Commands terminated with the same char

How can I fix the follow line: The problem is that the commands of for and -exec end with a semicolon, the for command has this statement and find statment with -exec Answer You don’t even need to use -exec echo {} since that is default action in find. You can use this for loop: There is no need to

pass commands server using perl openssh

there are 2 systems, client system, in which i am passing commands to the server by doing openssh to the server and my script goes like this and in server /p/inway/bin/inway71 is a scripts: so when i login to my server and run this script in my terminal, i will be directed to some path (i have no clue what