11-09-2014
Availability: echo vs. printf?
Hello,
For some reason i dont remember, i currently believe (but beeing unsure) that printf is available on more diffrent systems (unix, bsd, linux, ??) than echo is.
Could someone please enlighten me, whether this is true or not?
Thank you
PS:
I just found pages about the diffrences of the two commands, but not where they are available or not.
10 More Discussions You Might Find Interesting
1. Solaris
Hi, Im new in shell programming.
I need to know the availability for specific printers. We send requests from solaris to printers located at an NT server. My idea is creating a shell that will monitor availbaility and send an email when something is wrong.
I have a file with printers and its... (2 Replies)
Discussion started by: agsarm1971
2 Replies
2. UNIX for Dummies Questions & Answers
Bit of a weird one i suppose, i want to use an echo inside an echo... For example...
i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos...
echo "echo "hello"" >$file
echo "echo "goodbye"" >$file
... (3 Replies)
Discussion started by: mokachoka
3 Replies
3. Shell Programming and Scripting
I want to print a colored line using bash. I want to print:
Smtp status
where "Smtp status" will be in yellow and will be in green.
Thanks. (2 Replies)
Discussion started by: proactiveaditya
2 Replies
4. Shell Programming and Scripting
#!/usr/bin/ksh
var1="Hi World"
var2="Morning"
var3=$(echo "$var1" \n "$var2")
echo $var3
var3=$(printf "$var1 \n $var2")
echo $var3
Output
Any way to get
in my $var3 ? (7 Replies)
Discussion started by: dahlia84
7 Replies
5. Shell Programming and Scripting
This may be little confusing. I have Script1, which pulls data from the system and creates another script(lets say script2). While I run script1 I need to add printf/echo statements for script2, so that when I run script2 I see those statement.
eg: script1 765
printf " display frame-$1 timeoffset... (2 Replies)
Discussion started by: miltonrods
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to set up a iscsi high availability with sheepdog distributed storage.
Here is my system set up. Four nodes with sheepdog distributed storage and i am sharing this storage through iscsi using two nodes as well as using a virtual ip set up using ucarp.Two nodes using same iqn. And... (0 Replies)
Discussion started by: jobycxa
0 Replies
7. AIX
Hi,
Can someone help and give the answer for the following questions:
1. When PowerHA SystemMirror 7.1 is installed on AIX 7.1, what RSCT component does Cluster Aware AIX (CAA) replace?
A. Group Services
B. Resource Manager
C. Topology Services
D. Resource Monitoring and Control... (2 Replies)
Discussion started by: walterchang100
2 Replies
8. Shell Programming and Scripting
Hello script guru's
as i write more and more code i always block at managing output... either writing to standard out, writing to files via std out (log, temp file, etc). Don't get me wrong 99% of the time it DOES the job but maybe there is more efficient.
I'm writing a small script to... (2 Replies)
Discussion started by: maverick72
2 Replies
9. Shell Programming and Scripting
Hello
I want to check whether certain arguments were passed to the script, and when those are, not doing a log entry.
If those arguments are not passed, always do a log entry (*new call*).
What currently i have is this:
echo "${@}"|grep -q \\- || \
tui-log -e "$LOG" "\r---- New call $$... (4 Replies)
Discussion started by: sea
4 Replies
10. Solaris
hi guys
I posted problem last time I didn't find answer to my issue.
my problem is as below:
I have two servers which work as an actif/standby in high availability system.
but when i use command HASTAT -a i have the following message: couldn' find actif node.
the servers are sun... (1 Reply)
Discussion started by: zineb06
1 Replies
PARTX(8) System Manager's Manual PARTX(8)
NAME
partx - telling the kernel about presence and numbering of on-disk partitions.
SYNOPSIS
partx [-a|-d|-l] [--type TYPE] [--nr M-N] [partition] disk
DESCRIPTION
Given a block device ( disk ) and a partition table type , try to parse the partition table, and list the contents. Optionally add or
remove partitions.
This is not an fdisk - adding and removing partitions is not a change of the disk, but just telling the kernel about presence and numbering
of on-disk partitions.
OPTIONS
-a add specified partitions or read disk and add all partitions
-d delete specified or all partitions
-l list partitions. Note that the all numbers are in 512-byte sectors.
--type TYPE
Specify the partition type -- dos, bsd, solaris, unixware or gpt.
--nr M-N
Specify the range of partitions (e.g --nr 2-4).
SEE ALSO
addpart(8), delpart(8), fdisk(8), parted(8), partprobe(8)
AVAILABILITY
The partx command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
11 Jan 2007 PARTX(8)