10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
If i were to do this an print out the file, it will show as it is in the command
$ awk '/Privilege Use/ {P=0} /Object Access/ {P=1} P' AdvancedAudit.txt
Object Access
File System No Auditing
Registry No Auditing
Kernel... (1 Reply)
Discussion started by: alvinoo
1 Replies
2. Shell Programming and Scripting
Dear All,
this script was working well enough few days back. Now it started acting up.
Could anyone please throw some lights about what may be the reason for it's not working.
ts=$( printf "%(%s)T" "now" )
under debug mode this is what I get
printf "%(%s)T" "now"
++ printf '%(%s)T'... (4 Replies)
Discussion started by: manas_ranjan
4 Replies
3. Shell Programming and Scripting
Hi guys,
could someone throw some light on the following behaviour of printf (I'll start with info about the system and the tool/shell/interpreter versions)?:
$ uname -a
Linux linux-86if.site 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) x86_64 x86_64 x86_64... (9 Replies)
Discussion started by: elixir_sinari
9 Replies
4. Shell Programming and Scripting
I'm using cygwin on win7, What I would like to do is something like this:
cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e
I know I can start a new instance using either of these:
mintty -e ...
cygstart tail ...
But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies
5. Shell Programming and Scripting
The printf statement
pay_amount=$(printf "%013.3f" "$4")
working perfectly at one path(xxx/home/rsh) and showing error (printf: 216.000: invalid number) at another path(/opt/xxxx/xxxx).
what will be the reason?
thanks in advance (4 Replies)
Discussion started by: reeta_shri
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have just completed my first script (:D) and now i just need to format it with printf.
This is what I have:
#!/bin/ksh
TOTB=0
TOTF=0
TOTI=0
HOST=`hostname`
echo " FSYSTEM BLKS FREE INUSE MOUNTEDON"
df -m | grep -v ":"|grep -v Free|grep -v "/proc"| while read FSYSTEM... (2 Replies)
Discussion started by: compan023
2 Replies
7. Shell Programming and Scripting
echo $bbsize
1.5
echo $fillpercent
.95
echo $bbsize | awk '{printf "%.2f\n",$0*$fillpercent}'
2.25
echo $bbsize | awk '{printf "%.2f\n",$0*.95}'
1.42
1.42 is what I'm expecting...
echo $blocksize
4096
echo $bbsize | awk '{printf "%.2f\n",$0*$blocksize}'
2.25
echo $bbsize |... (3 Replies)
Discussion started by: xgringo
3 Replies
8. Shell Programming and Scripting
How to print output in following format?
A..................ok
AA................ok
AAA..............ok
AAAAAA........ok
"ok" one under one (4 Replies)
Discussion started by: mirusnet
4 Replies
9. Programming
What is the output of the following program considering an x86 based parameter passing sequence where stack grows towards lower memory addresses and that arguments are evaluated from right to left:
int i=10;
int f1()
{
static int i = 15;
printf("f1:%d ", i);
return i--;
}
main()
{... (2 Replies)
Discussion started by: arunviswanath
2 Replies
10. Shell Programming and Scripting
hi, i would like to extract the header and put it in a variable, then use printf to output the variable, but i keep on getting errors...please tell me if my format is incorrect.
HDR = "`ps -e -o user,pid,ppid,pcpu,stime,etime,time,comm | head -n 1`"
printf (%s, $HDR);
thanks! (3 Replies)
Discussion started by: laila63
3 Replies