08-31-2014
The "let" command originated in ksh. Dave Korn considered it to be a mistake and very quickly developed the double parentheses notation to replace it. By the mid 1980's the advice was to not use the "let" command in new code. However the let command is still available. It is intended for legacy code. bash copied ksh arithmetic including both the double parentheses and the "let" command. And the bash team followed Dave's lead in not recommending the "let" command.
I started using ksh in the late 80's. The "let" command had been deprecated for several years even back then. I have been writing ksh scripts form over a quarter of a century. I don't believe that I have ever used "let". I don't believe that I ever will.
These 2 Users Gave Thanks to Perderabo For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
2. Shell Programming and Scripting
Input file:
2 aux003.net3.com error12
6 awn0117.net1.com error13
84 aux008 error14
29 aux001.ha.ux.isd.com error12
209 aux002.vm.ux.isd.com error34
21 alx0027.vm.net2.com error12
227 dux001.net5.com error123
22 us008.dot.net2.com error121
13 us009.net2.com error129Expected Output:
2... (4 Replies)
Discussion started by: sQew
4 Replies
3. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies
5. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
6. Shell Programming and Scripting
I'm on Ubuntu 14.04 and I manually updated my coreutils so that "tee" is now on version 8.27
I was running a script using bash where there is some write to pipe error at some point causing the tee command to exit abruptly while the script continues to run. The newer version of tee seems to prevent... (2 Replies)
Discussion started by: stompadon
2 Replies
7. Shell Programming and Scripting
I've found this script part on the stackoverflow:
if ; then
sudo bash "$0" "$@";
exit "$?";
fi
I realized that sudo bash "$0" "$@"; is the only needed for me.
But the strange thing happens when I move this line outside the IF statement:
sudo bash "$0" "$@"; stops the... (9 Replies)
Discussion started by: boqsc
9 Replies
8. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
9. AIX
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT CENTOS
udisksctl
UDISKSCTL(1) User Commands UDISKSCTL(1)
NAME
udisksctl - The udisks command line tool
SYNOPSIS
udisksctl status
udisksctl info {--object-path OBJECT | --block-device DEVICE}
udisksctl mount {--object-path OBJECT | --block-device DEVICE} [--filesystem-type TYPE] [--options OPTIONS...] [--no-user-interaction]
udisksctl unmount {--object-path OBJECT | --block-device DEVICE} [--force] [--no-user-interaction]
udisksctl unlock {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction]
udisksctl lock {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction]
udisksctl loop-setup --file PATH [--read-only] [--offset OFFSET] [--size SIZE] [--no-user-interaction]
udisksctl loop-delete {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction]
udisksctl smart-simulate --file PATH {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction]
udisksctl monitor
udisksctl dump
udisksctl help
DESCRIPTION
udisksctl is a command-line program used to interact with the udisksd(8) daemon process.
COMMANDS
status
Shows high-level information about disk drives and block devices.
info
Shows detailed information about OBJECT or DEVICE.
mount
Mounts a device. The device will be mounted in a subdirectory in the /media hierarchy - upon successful completion, the mount point
will be printed to standard output.
The device will be mounted with a safe set of default options. You can influence the options passed to the mount(8) command with
--options. Note that only safe options are allowed - requests with inherently unsafe options such as suid or dev that would allow the
caller to gain additional privileges, are rejected.
unmount
Unmounts a device. This only works if the device is mounted. The option --force can be used to request that the device is unmounted
even if active references exists.
unlock
Unlocks an encrypted device. The passphrase will be requested from the controlling terminal and upon successful completion, the
cleartext device will be printed to standard output.
lock
Locks a device. This only works if the device is a cleartext device backed by a cryptotext device.
loop-setup
Sets up a loop device backed by FILE.
loop-delete
Tears down a loop device.
smart-simulate
Sets SMART data from the libatasmart blob given by FILE - see /usr/share/doc/libatasmart-devel-VERSION/ for blobs shipped with
libatasmart. This is a debugging feature used to check that applications act correctly when a disk is failing.
monitor
Monitors the daemon for events.
dump
Prints the current state of the daemon.
help
Prints help and exit.
COMMON OPTIONS
The option --no-user-interaction can be used to request that no interaction (such as the user being presented with an authentication
dialog) must occur when checking with polkit(8) whether the caller is authorized to perform the requested action.
AUDIENCE
This program does not assume that the caller is the super user - it is intended to be used by unprivileged users and authorizations are
checked by the udisks daemon using polkit(8). Additionally, this program is not intended to be used by scripts or other programs -
options/commands may change in incompatible ways in the future even in maintenance releases. See the "API STABILITY" section of udisks(8)
for more information.
BASH COMPLETION
udisksctl ships with a bash completion script to complete commands, objects, block devices and some options.
AUTHOR
Written by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others.
BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at
http://bugs.freedesktop.org/enter_bug.cgi?product=udisks.
SEE ALSO
udisks(8), udisksd(8), umount.udisks2(8), polkit(8)
udisks 2.1.2 March 2013 UDISKSCTL(1)