Shell variables beginning with '_'

Forum rules
Before you post please read this

Shell variables beginning with '_'

Postby Tachtory on Fri Jan 10, 2014 8:11 am

I notice there are a large number of shell variables beginning with '_', many of them seem to be function definitions.

Running Linux Mint 15 Cinnamon. Not sure if this is common to all versions of mint; my solution to filter them out has been to pipe through grep:

Code: Select all
$ set | grep -e ^[a-Z]


It hasn't caused me any problems, I am just learning about environment variables and comparing differences with other distro (Slackware)
Tachtory
Level 1
Level 1
 
Posts: 18
Joined: Mon Aug 26, 2013 4:15 pm

Linux Mint is funded by ads and donations.
 

Re: Shell variables beginning with '_'

Postby karlchen on Sun Jan 12, 2014 7:07 pm

Hello, Tachtory.

Would the easiest command to get a list of all environment variables not be
Code: Select all
env

Cheers,
Karl
Image
Enlightened by Lucid Lynx, enchanted by Maya, impressed by Petra.
User avatar
karlchen
Level 9
Level 9
 
Posts: 2519
Joined: Sat Dec 31, 2011 7:21 am

Re: Shell variables beginning with '_'

Postby Tachtory on Mon Jan 13, 2014 4:58 am

Yes, but 'set' is showing the local shell variables for bash (not environment variables)
Tachtory
Level 1
Level 1
 
Posts: 18
Joined: Mon Aug 26, 2013 4:15 pm


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest