Linux / UNIX Tech Support Forum
This is a discussion on Shell Creates a variable that stores the results of the command within the Shell scripting forums, part of the Development/Scripting category; i am a new writing script for UNIX i was wondering if anyone can help me with writing this script ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
i am a new writing script for UNIX i was wondering if anyone can help me with writing this script cheers
. Creates a variable that stores the results of the command "ls –l" . Directly calls the command "ls –l" (ie not through the variable) . Displays a separating line (eg a line of – characters) . Displays the value of the variable. |
| Sponsored Links | ||
|
|
|
||||
|
Try
Code:
VAR=$(command-name) VAR=$(ls -l) echo $VAR Code:
O=$IFS IFS="\n" echo $V IFS=$O
__________________
Vivek Gite Linux Evangelist |
![]() |
| Tags |
| $ifs , bash , echo , shell , shell variable |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't Open folder from Search Results | nabilalk | Ubuntu / Debian | 0 | 03-04-2009 12:46 AM |
| Squid with squidGuard - Server Creates more processes for squidGuard & then hangs | cjagdish69@gmail.com | Proxy Servers | 0 | 09-23-2008 04:04 PM |
| Run mv command from ftp shell script | subin | Shell scripting | 6 | 05-02-2008 09:44 AM |
| running command a root in shell scripts | chiku | Shell scripting | 1 | 07-17-2006 06:39 PM |
| How to pass shell variable to awk program | Shell scripting | 4 | 06-23-2006 05:11 AM | |