Operating System - HP-UX
1823920 Members
3198 Online
109667 Solutions
New Discussion юеВ

What does the hat symbol signify in a script

 
Hunki
Super Advisor

What does the hat symbol signify in a script

What does the hat "^" symbol signify in a script.

Thanks,

Hunki
3 REPLIES 3
Rodney Hills
Honored Contributor

Re: What does the hat symbol signify in a script

In olden times it was used the same as the pipe symbol (|). But it's been deprecated.

Example-
ls -l ^ more

HTH

-- Rod Hills
There be dragons...
Patrick Wallek
Honored Contributor

Re: What does the hat symbol signify in a script

It depends on its usage.

If it is part of a awk, sed or grep statement (ie. a regular expression) then it is likely used to signify the beginning of a line.

For example, if you were to do:

grep "^user1:" /etc/passwd

It would look for user1: at the beginning of the line and not anywhere else in the line.
Hunki
Super Advisor

Re: What does the hat symbol signify in a script

Thanks Pat!!