Skip to main content
added 30 characters in body
Source Link
jesse_b
  • 41.6k
  • 14
  • 108
  • 162

In bash and sh "$@" will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting, globbing, empty removal, etc from being performed on each parameter.

3.4.2 Special Parameters

In bash and sh "$@" will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting from being performed on each parameter.

3.4.2 Special Parameters

In bash and sh "$@" will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting, globbing, empty removal, etc from being performed on each parameter.

3.4.2 Special Parameters

added 2 characters in body
Source Link
ilkkachu
  • 147.9k
  • 16
  • 268
  • 441

In bash and sh $@"$@" will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting from being performed on each parameter.

3.4.2 Special Parameters

In bash and sh $@ will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting from being performed on each parameter.

3.4.2 Special Parameters

In bash and sh "$@" will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting from being performed on each parameter.

3.4.2 Special Parameters

Source Link
jesse_b
  • 41.6k
  • 14
  • 108
  • 162

In bash and sh $@ will expand all positional parameters so:

cgrep () {
   clear
   clear
   grep "$@"
}

Note that $@ has to be double quoted to prevent word splitting from being performed on each parameter.

3.4.2 Special Parameters