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
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
4. 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
5. 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
6. Programming
hello all, i came accross an aptitude question ..
int
main()
{
int a = 10, b = 20, c = 30;
printf("%d\t%d\t%d");
}
it gives output
30 20 10
what is the reason of such behaviour of printf().
thank you. (7 Replies)
Discussion started by: zius_oram
7 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