# Variable

**URL:** <https://community.unix.com/t/variable/224923>\
**Category:** Shell Programming and Scripting\
**Created:** [December 18, 2008, 1:12pm UTC](https://community.unix.com/t/variable/224923 "2008-12-18T13:12:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![himvat](https://community.unix.com/letter_avatar/himvat/32/6_449c533f586939b6e5f246632a46421f.png) [@himvat](https://community.unix.com/u/himvat)\
**Post date:** [December 18, 2008, 1:12pm UTC](https://community.unix.com/t/variable/224923/1 "2008-12-18T13:12:10Z")

</div>

Hi ,

If "c.log" is a file. This file contains a number.

How to assign the content of file "c.log" as a variable ?

Please guide

regards

---

<div class="post-metadata">

**Author:** ![Ikon](https://community.unix.com/user_avatar/community.unix.com/ikon/32/1015_2.png) [@Ikon](https://community.unix.com/u/Ikon)\
**Post date:** [December 18, 2008, 1:16pm UTC](https://community.unix.com/t/variable/224923/2 "2008-12-18T13:16:23Z")

</div>

```nohighlight
variable=`cat c.log`
echo $variable

```
