Hi wisecracker,
There are lots of things to consider here. Strings used in variable assignments follow slightly different rules than strings used in other shell operations (such as command-line arguments to utilities). See the following script for example:
which produces the output:
So, in your statement:
it does what you want even though the expansions $y and $x are not quoted (because it is an assignment statement). But, why are you adding the extra double-quotes? They don't do anything but make the code harder to read. Variable expansions, command substitutions, and arithmetic expansion are all processed in double-quoted strings, so why not simplify your code and make it easier to read and understand:
(which is a single double-quoted string). Or, if you are really against using braces to keep variable names separate from following text:
(which has the constant characters in the two single-quoted strings and the variable expansions in a single double-quoted string).
And, besides being easier to read and understand, I would think either of these should make shellcheck happy too. (But I don't have shellcheck installed on my system; so I haven't verified that.)
I should also have mentioned in earlier posts on this subject that \x followed by two hexadecimal digits is a common extension provided by many implementations of the printf utility (both stand-alone and as shell built-ins), but it is not mentioned in the standards. Similarly, \e is a common extension that expands to an escape character in the current locale provided by many implementations of the printf utility, but it is not mentioned in the standards either. With any standards conforming version of printf, you can use the octal escape sequence \033 to specify an escape character in locales with an underlying codeset that is a superset of ASCII.
One of my Solaris 8 machines hd was about to die. So I used g4u to create an image of the 9gb drive and I put it in a 36gb drive. That solved my dieing hd problem.
But....
How do I get my machine to see the unused 27gb of space?
Any help would be greatly appreciated. (1 Reply)
Hi,
How do I query for unused partition in AIX 4.3 with DAS and SAA storage?
I know most unix administrator don't put all the capacity on the system at once.
thanks,
vene (1 Reply)
Hello,
I have a system with HP-UX 11.23 installed on it. There are ~36GB of unused space on the HDD. I did a very basic installation, and it created the usual volume group /dev/vg00. When I look at the output of ioscan -funC disk, I see this (and more, but irrelevant to this post):
disk ... (1 Reply)
i Have alloted 20G in my vmware for solaris 10, upon installation, and some distribution of disk space to /,/opt,swap i just use 19G.
Can i still use the 1G? How? how to see the 1G? that i did not use? how can i use it?
appreciate your responce (17 Replies)
Hi,
In our AIX 5.2 server , we have one unused ethernet adapter which doesn't have cable connection . For this interface , we are getting alerts in errpt .
Could you suggesthow to stop this alert ? And sametime i would like to keep this device in ODM .
Is there... (1 Reply)
Hello,
When creating shared memory in C, should be remove shared memory with shmctl function when don't need it. If it didn't remove, occupied shared memory stay and remain.
If we create shared memory repeatedly without removing unusable shared memory, /dev/shm will full.
Does Unix or... (1 Reply)
Dear all,
I have a new Oracle Blade X4-2B server, running Solaris 10.
The server comes with a HBA card that will not be used now. It has not fibers connected to it. As a consequence, its leds never stop flashing.
My question is: how to disable this HBA card, without removing it physically... (2 Replies)