Flag Description -A, --user-agent <string> Specifies the User-Agent string to send to the server. -b, --cookie <data> Sends cookies to the server. Can be a string or a file name. -c, --cookie-jar <file> Writes cookies to the specified file after the transfer. -d, --data <data> Sends data in a POST request. Can be used with application/x-www-form-urlencoded or application/json (with -H ). -F, --form <name=content> Submits form data. Useful for file uploads and multipart forms. -G, --get Forces curl to use the GET method instead of POST when -d is used. -H, --header <header> Adds a custom header to the request. Multiple h...
Special Variable Description $# Number of positional parameters (arguments) passed to the script. $? Exit status of the last executed command. A value of 0 usually indicates success, and any non-zero value indicates an error. $0 The name of the script or command that is being executed. $1 , $2 , ... The first, second, and subsequent positional parameters passed to the script. $1 is the first argument, $2 is the second, and so on. $* All the positional parameters passed to the script, treated as a single word. "$@" All the positional parameters passed to the script, treated as separate words. This preserves each parameter as a distinct word, even if they contain spaces. ...
In shell scripting, various file-related conditions can be used to check the properties of files. Here are some common file-related conditions in Bash scripting: Existence Checks : -e file : True if file exists. -f file : True if file exists and is a regular file. -d file : True if file exists and is a directory. -s file : True if file exists and has a size greater than zero. Permission Checks : -r file : True if file exists and is readable. -w file : True if file exists and is writable. -x file : True if file exists and is executable. Ownership Checks : -O file : True if file exists and is owned by the current user. -G file : True if file exists and is owned by the current group. Modification Time Checks : -nt file : True if the current file is newer than file . -ot file : True if the current file is older than file . Type Checks : -h file : True if file exists and is a symbolic link. -L file : Same as -h . -p file : True if file exists and is a named pipe (FIFO). -S ...
Comments
Post a Comment