I want to run a command and save its output and its exit code, in different files.
Here's what i am doing:
cmd.exe /C command 1> %TEMP%\output.log 2> %TEMP%\error.log && echo %ERRORLEVEL% > %TEMP%\status || echo %ERRORLEVEL% > %TEMP%\status
If i don't do output redirection (into %TEMP%\output.log and/or %TEMP%\error.log), then exit code is saved just fine.
However, when i r
The only calculator I know is bc. I want to add 1 to a variable, and output to another variable.
I got the nextnum variable from counting string in a file:
nextnum=`grep -o stringtocount file.tpl.php | wc -w`
Lets say the nextnum value is 1. When added with 1, it will become 2.
Hello Everyone.
I am trying to run the Timex Data Link USB software in Ubuntu so that I can synchronize my Timex Data Link T53722 watch with it.
This is how Wine responds to that attempt: http://pastebin.com/xc6p0Nxz
Could someone please assist me with this?
Thank you for your time. :)
Hello All,
I need help here with a script. I have a script here which generates a html output with set of commands and is working fine.
Now i want to add a new command/function which would run on all the remote blades and output should be included in this html file.
HI All,
I am using grep command to serach a pattern in a list of files and storing the output in a variable. Then i am applying some logic on that variable to get the required output.
Hi,
Whenever the output of a command (in a terminal) is too long and expanding in real time thereby not fitting in one screen one has to press the Space bar to go down one screen, but how do I get one screen back? Yes, with the mouse one can scroll up and down. But there must be a key one has to use to move up and down the screen as well, I guess.
I have One file - temp.txt - which contains
ABCDF
PQRST
LMNOP
I tried this cut command
$ cut -c 2-5 temp.txt
BCDF
QRST
MNOP
output is right.
$ cut -c 1,2,3,4 temp.txt
ABCD
PQRS
LMNO
output is right.
But when I change sequence, meaning
$ cut -c 2-4,1 temp.txt
ABCD
PQRS
LMNO
above output displayed.
but logically output is
BCDA
QRSP
MNOL
so my question is how this happen
Could you please explain about calculate CPU utilization of aix server using lparstat command?
Here below i have provided example output from aix test server.
System configuration: type=Shared mode=Uncapped smt=On lcpu=4 mem=4096 psize=63 ent=0.50
Code:
%user %sys %wait %idle physc %entc lbusy vcsw phint
----- ----- ------ ------ ----- ----- ------ ----- --
Hi Expert,
I want to print CPU and Memory utilization into a text file. I am using "prstat -Z" to see the output on screen. When I run below command
Code:
prstat -Z | grep httpd | awk '{print$3} '>> output.txt
but it is not printing to file.