10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Gurus... good day;
currently I trying to run the df -g command with awk to get to convert in SQL statement, but I have some errors;
df -g | awk '{print "This is the FileSystem: " $NF, " This is LV: "$1, "This is SIZE: "$2, "This is FREE: " $3, "This is the USED% "$4}'
This on AIX... (3 Replies)
Discussion started by: wcastibl
3 Replies
2. Shell Programming and Scripting
hi all,
I had my script as
a=qw
b=rter
c=fdfd
curency=1000
printf"${curency} $a $b $c" > filename
can i have printf statement that can change the currency from 1000 to 1,000 like it should convert the number to currency format ..?(i.e for any number) (14 Replies)
Discussion started by: hemanthsaikumar
14 Replies
3. Shell Programming and Scripting
I have a lines like below, captured from rrdtool fetch command,
1395295200 2.0629986254e+06 7.4634784967e+05
1395297000 2.0198121616e+06 6.8658888903e+05
1395298800 1.8787141122e+06 6.7482866452e+05
1395300600 1.7586118678e+06 6.7867977653e+05
1395302400 1.8222762151e+06 7.1301678859e+05I'm... (3 Replies)
Discussion started by: rk4k
3 Replies
4. Shell Programming and Scripting
Hello
can you please help me with below script which is meant to delete clients from multiple netbackup policies
I want to run a command insdie awk statement
apparelnlty this script is not working for me
for i in $( cat clients_list)
do
bppllist -byclient $i | awk... (6 Replies)
Discussion started by: Sara_84
6 Replies
5. Shell Programming and Scripting
I am writing a script in bash and want to perform the operation
I check number of arguments and make a print statement with the passes arguments
If I pass 3 arguments I will do
printf "$frmt" "$1" "$2" "$3"If I have 4 arguments I do
printf "$frmt" "$1" "$2" "$3" "$4"etc (4 Replies)
Discussion started by: kristinu
4 Replies
6. Shell Programming and Scripting
Hi,
I am using below awk code to convert a csv file data into fixed file format.
awk 'BEGIN { FS = ","
fmt = "%10s%010d%10s%d%1d\n" }
NR>1 { printf fmt, $1, $2, $3, $4*100, $5 }' /data/mydata.csv > /data/fixed.dat
Data in mydata.csv
================... (2 Replies)
Discussion started by: kbmkris
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am using below awk code to convert a csv file data into fixed file format.
awk 'BEGIN { FS = ","
fmt = "%10s%010d%10s%d%1d\n" }
NR>1 { printf fmt, $1, $2, $3, $4*100, $5 }' /data/mydata.csv > /data/fixed.dat
Data in mydata.csv
================... (1 Reply)
Discussion started by: kbmkris
1 Replies
8. 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
9. Shell Programming and Scripting
Hi all,
How can i use the below unix command in AWK . Can any one please suggest me how i can use.
sed -e "s/which first.sh/which \$0/g" $shell > $shell.sal
where $0=current program name(say current.sh)
$shell=second.sh (1 Reply)
Discussion started by: krishna_gnv
1 Replies
10. Shell Programming and Scripting
Hi,
I sometimes bulk upload data in oracle. The problem is that I sometimes get an INSERT statemnt like this:
INSERT INTO ALL_USER_HOTSPOT_DETAILS (USR_LOGIN,USR_LASTNAME,USR_FIRSTNAME,USR_EMAIL,
PROPERTYNR)
VALUES ('SABRDAG','D'AGOS','SABRINA','sabrina_d'agos@sheraton.com',70)
I... (4 Replies)
Discussion started by: nattynatty
4 Replies