Bash 101 Help Please

Amit Nepal amit at amitnepal.com
Thu Jul 25 12:06:25 MST 2013


*In This line , if I understood correctly you are trying to append 
$oldline and $username both to smb.conf
*
**echo $oldline && echo $username  >> /etc/samba/smb.conf

*however, it will only append $username to smb.conf, you probably want 
to make it in two lines ,
eg.

*
**echo $oldline ******>> /etc/samba/smb.conf**
echo $username  >> /etc/samba/smb.conf

***or if you want them on the same line, you would have to combine the 
variables and echo new variable into the smb.conf

newline=${oldline}${username}
echo $newline >> /etc/samba/smb.conf


Thank you

*
*Amit K Nepal
Infrastructure Engineer (RHCE, CCENT, C|EH, C|HFI)
omNovia Technologies Inc. <http://www.omnovia.com>
Amit K Nepal <http://www.amitnepal.com>
<http://www.amitnepal.com>*
On 7/25/2013 11:46 AM, Lisa Kachold wrote:
> *echo $oldline && echo $username  >> /etc/samba/smb.conf*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20130725/9033896f/attachment.html>


More information about the PLUG-discuss mailing list