Sponsored Content
Full Discussion: affect variable
Top Forums Shell Programming and Scripting affect variable Post 302154875 by vino on Wednesday 2nd of January 2008 08:36:08 AM
Old 01-02-2008
Quote:
Originally Posted by kamel.seg
i want to know if i want to print this $var in new file how can i do it?

awk -F "," '{ print $1","$2","$var,"$4"} file1>file2 ?

how can i print this value of var in new file?
With that awk statement, what are you trying to achieve ? Get the value of $var or print the field denoted by $var ?

To print to a file, you can

Code:
echo "$var" > my.file

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

changig uid and the affect it will have

Hello, I have 2 sun servers. We are running Oracle apps. We have to apply patches to both servers whenever a patch needs to be applied for Oracle. We use the same username eg. applmgr on both servers. We have a shared patch area which we can run the patch from on both boxes. the uid for... (2 Replies)
Discussion started by: d__browne
2 Replies

2. Solaris

making new default gateway take affect

How do you make the changes take affect when you change the subnet masks or default router without rebooting? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

3. Solaris

Will Password change affect authorized_keys?

Hello gurus, I have question. I have enabled ssh on the servers. I am planning to change the oracle user's(os user) password. If I change the password will it affect the authorized_keys? Do I need to regenerate it. Thanks, (2 Replies)
Discussion started by: oracleuser
2 Replies

4. UNIX for Dummies Questions & Answers

.profile - changes don't affect the login

I have modified the .profile in my profile and I don't see any effect. Why the changes don't have effect? I tried both on the account at a server where I have limited permissions as user and to my local pc (as user). Is it the .profile overridden by some other file? It looks weird because I... (8 Replies)
Discussion started by: myle
8 Replies

5. Solaris

Will creating symbolic links affect users

Hi, I have a quick question with regards to creating symbolic links. Would creating a symbolic link from one directory to a file in another cause any issues for users that are currently logged into the box. I don't believe it will unless they are using the file in question, but I would like... (2 Replies)
Discussion started by: Chains
2 Replies

6. Shell Programming and Scripting

affect a exploded a string into an array

I would like to affect an exploded string into an array. one:two::fourinto an array: a => one a => two a => a => four Quite simple in other languages with functions like explode() or split(). The best I could come up with was this: until do token=${string%%:*} # takes the... (8 Replies)
Discussion started by: ripat
8 Replies

7. Shell Programming and Scripting

Will moving data from one filesystem to another affect current software installation

Here we have concern. We have a IBM software installed in a server S1 in the location : /opt/IBM. In this server S1, we have /opt file system in local disk. We don't have any option to increase the file system there. We have created a separate /opt/IBM_NEW file system with 10GB in S1 server.... (1 Reply)
Discussion started by: mehimadri
1 Replies

8. Shell Programming and Scripting

Bash script affect load average

Hello I have created next scritpt to do the next: chekp if host is alive. When the host down, launch telnet other equip to do checks. When execute the script the load average of the machines increase. For example: Before launch script top - 11:14:56 up 14 days, 18:06, 3 users, load... (3 Replies)
Discussion started by: capilla
3 Replies

9. UNIX and Linux Applications

Having too many connections could affect performance ?

Good evening, i need your help please I will try to describe the scenario briefly: In a Telecom Production system application receives a certain files called CDRs(call detail records) to be processed by doing some operating systems operations and then database operations like creating indexes... (4 Replies)
Discussion started by: alexcol
4 Replies
FLOATVAL(3)								 1							       FLOATVAL(3)

floatval - Get float value of a variable

SYNOPSIS
float floatval (mixed $var) DESCRIPTION
Gets the float value of $var. PARAMETERS
o $var - May be any scalar type. floatval(3) should not be used on objects, as doing so will emit an E_NOTICE level error and return 1. RETURN VALUES
The float value of the given variable. Empty arrays return 0, non-empty arrays return 1. Strings will most likely return 0 although this depends on the leftmost characters of the string. The common rules of float casting apply. EXAMPLES
Example #1 floatval(3) Example <?php $var = '122.34343The'; $float_value_of_var = floatval($var); echo $float_value_of_var; // 122.34343 ?> Example #2 floatval(3) non-numeric leftmost characters Example <?php $var = 'The122.34343'; $float_value_of_var = floatval($var); echo $float_value_of_var; // 0 ?> SEE ALSO
boolval(3), intval(3), strval(3), settype(3), Type juggling. PHP Documentation Group FLOATVAL(3)
All times are GMT -4. The time now is 04:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy