Sponsored Content
Full Discussion: how to lead space in value
Top Forums UNIX for Dummies Questions & Answers how to lead space in value Post 302419804 by Scott on Sunday 9th of May 2010 05:41:30 AM
Old 05-09-2010
Hi.

Typeset -L / -R works, but you have to quote the variable, otherwise the whitespace is removed:

Code:
$ typeset -R20 a=Hello
$ echo $a
Hello
$ echo "$a"
               Hello
$ typeset -L20 a=Hello
$ echo $a World 
Hello World
$ echo "$a"World
Hello               World

 

2 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Android Captures Smartphone Lead In U.S.

Reference (1 Reply)
Discussion started by: Neo
1 Replies

2. Gentoo

Help & lead me to the end. VFS: readonly/fs couldn't mount.

In a case of root=/dev/ram0 real_root=/dev/sda2 No filesystem could mount root, tried: ext3 ext2... Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) http://imageplay.net/img/tya22288136/IMG0204A.jpg (real_root - real panic) The case of omitting real_root and... (1 Reply)
Discussion started by: Xcislav
1 Replies
echo(3XCURSES)						  X/Open Curses Library Functions					    echo(3XCURSES)

NAME
echo, noecho - enable/disable terminal echo SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int echo(void); int noecho(void); DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially, curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft- ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined. RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5) SunOS 5.11 5 Jun 2002 echo(3XCURSES)
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy