answersLogoWhite

0

It can depend on which shell environment you are using, but what I use is:

function something

{

# body of routine

}

# call the function

something

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: How do you write functions in Linux shell scripting?
Write your answer...
Submit
Still have questions?
magnify glass
imp