10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system.
df -h | awk -v host=`hostname` '
BEGIN {
print "<table border="4"... (13 Replies)
Discussion started by: Harihsun
13 Replies
2. Shell Programming and Scripting
I am trying to automate a script where I need to use pbrun /bin/su but for some reason it is not passing thru the pbrun as my code below.
. ~/.bash_profile
pbrun /bin/su - content
c h 1
hpsvn up file path
I am executing this from an external .sh file that is pointing to this scripts file... (14 Replies)
Discussion started by: jorgejac
14 Replies
3. 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
4. Shell Programming and Scripting
hi, i have a script as:
printf '%s -> %s\n' "$(date '+%Y-%m-%d %H:%M')" "$(/opt/gcsw/status -ne | fgrep 'State:2' | wc)"
which gives output as: 2013-01-18 13:00 -> 80 480 6529 and it is working fine.
now I want to put this into cronjob and write the output to a file in every 5... (7 Replies)
Discussion started by: gc_sw
7 Replies
5. Shell Programming and Scripting
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have some issue with qsub and the standard output : I launch a script that "echoes" the string "abc" and then executes a C program in which I print informations with the printf function ; the .o file contains "abc" but not the information displayed by printf. I also tried... (0 Replies)
Discussion started by: Shaderw
0 Replies
7. 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
8. Shell Programming and Scripting
I have the following code:
$ awk '{ printf "%-10s %s\n", $1, $2, $3, $4, $5, $5, $6 }' file
i can only print the first 2 elements ($1,$2). How can i print all the elements to appear like this:
aardvark 5555553 jhfjhfjkg efiigig ejkfjkej wjkdjk
alpo-net 5553412 ... (2 Replies)
Discussion started by: DDoS
2 Replies
9. 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
10. 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
XPRINTF_EXEC(3) BSD Library Functions Manual XPRINTF_EXEC(3)
NAME
asxprintf_exec, dxprintf_exec, fxprintf_exec, sxprintf_exec, xprintf_exec, vasxprintf_exec, vdxprintf_exec, vfxprintf_exec, vsxprintf_exec,
vxprintf_exec -- execute-only extensible printf execution
SYNOPSIS
#include <printf.h>
int
asxprintf_exec(char ** restrict ret, printf_comp_t restrict pc, ...);
int
dxprintf_exec(int fd, printf_comp_t restrict pc, ...);
int
fxprintf_exec(FILE * restrict stream, printf_comp_t restrict pc, ...);
int
sxprintf_exec(char * restrict str, size_t size, printf_comp_t restrict pc, ...);
int
xprintf_exec(printf_comp_t restrict pc, ...);
#include <stdarg.h>
int
vasxprintf_exec(char ** restrict ret, printf_comp_t restrict pc, va_list ap);
int
vdxprintf_exec(int fd, printf_comp_t restrict pc, va_list ap);
int
vfxprintf_exec(FILE * restrict stream, printf_comp_t restrict pc, va_list ap);
int
vsxprintf_exec(char * restrict str, size_t size, printf_comp_t restrict pc, va_list ap);
int
vxprintf_exec(printf_comp_t restrict pc, va_list ap);
DESCRIPTION
These functions are execute-only, extensible printf (see xprintf(5)) variants, taking a printf_comp_t structure created by the format string
compilation routine new_printf_comp(3). All these variants behave like their normal printf counterparts (see printf(3)) without 'x' and
``_exec'' in the name (except sxprintf_exec() and vsxprintf_exec() behave like snprintf() and vsnprintf(), respectively).
SEE ALSO
printf(3), xprintf_comp(3), xprintf(5)
Darwin Aug 19, 2012 Darwin