p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/util-linux-2.23.2/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/share/doc/util-linux-2.23.2/getopt-parse.bash
#!/bin/bash

# A small example program for using the new getopt(1) program.
# This program will only work with bash(1)
# An similar program using the tcsh(1) script language can be found
# as parse.tcsh

# Example input and output (from the bash prompt):
# ./parse.bash -a par1 'another arg' --c-long 'wow!*\?' -cmore -b " very long "
# Option a
# Option c, no argument
# Option c, argument `more'
# Option b, argument ` very long '
# Remaining arguments:
# --> `par1'
# --> `another arg'
# --> `wow!*\?'

# Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential!
# We need TEMP as the `eval set --' would nuke the return value of getopt.
TEMP=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
     -n 'example.bash' -- "$@"`

if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi

# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"

while true ; do
	case "$1" in
		-a|--a-long) echo "Option a" ; shift ;;
		-b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
		-c|--c-long)
			# c has an optional argument. As we are in quoted mode,
			# an empty parameter will be generated if its optional
			# argument is not found.
			case "$2" in
				"") echo "Option c, no argument"; shift 2 ;;
				*)  echo "Option c, argument \`$2'" ; shift 2 ;;
			esac ;;
		--) shift ; break ;;
		*) echo "Internal error!" ; exit 1 ;;
	esac
done
echo "Remaining arguments:"
for arg do echo '--> '"\`$arg'" ; done
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
September 29 2025 07:01:39
0 / 0
0755
AUTHORS
17.908 KB
February 02 2021 16:30:35
0 / 0
0644
COPYING.BSD-3
1.358 KB
February 27 2013 16:46:29
0 / 0
0644
COPYING.GPLv2
17.668 KB
February 27 2013 16:46:29
0 / 0
0644
COPYING.LGPLv2.1
25.908 KB
February 27 2013 16:46:29
0 / 0
0644
COPYING.UCB
1.781 KB
February 27 2013 16:46:29
0 / 0
0644
NEWS
66.857 KB
July 31 2013 11:27:10
0 / 0
0644
README
1.118 KB
February 27 2013 16:46:29
0 / 0
0644
deprecated.txt
1.896 KB
June 13 2013 07:46:10
0 / 0
0644
getopt-parse.bash
1.463 KB
February 27 2013 16:46:29
0 / 0
0644
getopt-parse.tcsh
2.198 KB
February 27 2013 16:46:29
0 / 0
0644
sfdisk.txt
10.648 KB
February 27 2013 16:46:29
0 / 0
0644