Link to home
Get AccessLog in
Avatar of andieje
andieje

asked on

special characters in linux - when is \t a tab or the time

Hi

I'm not sure in linux how the difference between special characters work. When is \t a tab or the time. If i wanted to output a tab i could write

echo $'\t'

but if i wanted to set the shell prompt to show the time i would write

PS1='\t'

Why are they treated differently when both times i am creating a string?

thanks
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

which shell are you using?
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
SOLUTION
Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access