Oracleasm querydisk command output
I hope this is an easy question!
Currently I have -
#rpm -qa | grep oracleasm
oracleasm-support-2.1.2-1.el5
oracleasm-2.6.18-92.el5-2.0.5-1.el5
Standard commands give -
# oracleasm listdisks
ASM_DATA_1_1
ASM_DATA_1_2
ASM_DATA_2_1
ASM_DATA_2_2
ASM_FRA_1_1
ASM_FRA_1_2
ASM_FRA_1_3
ASM_FRA_1_4
ASM_IMG_1_1
ASM_IMG_1_2
ASM_IMG_1_3
ASM_IMG_1_4
# oracleasm querydisk ASM_DATA_1_1
Disk "ASM_DATA_1_1" is a valid ASM disk
# oracleasm querydisk ASM_FRA_1_4
Disk "ASM_FRA_1_4" is a valid ASM disk
I am researching an issue I had with multipathing failover and wanted to see what device path ASM saw each disk on and the examples I saw seem to show the 'querydisk' command should have output like -
# /etc/init.d/oracleasm querydisk VOL1
Disk "VOL1" is a valid ASM disk on device [8, 97]
Any idea why the version of oracleasm I have is not giving the 'on device' information?
Thanks
Find device name ;)
# oracleasm listdisks
DISK01
DISK02
# oracleasm querydisk DISK01
Disk "DISK01" is a valid ASM disk
# oracleasm querydisk -d DISK01
Disk "DISK01" is a valid ASM disk on device [8, 38]
use [8, 38] -> to find device on /dev/*
# ls -l /dev/* | grep '8,' | grep 38
brw-rw---- 1 root disk 8, 38 Jun 17 21:56 /dev/sdc6
And idea to... if you confuse... why don't you see, ASMlib 're mapped on multi-path
http://surachartopun.com/2009/06/check-device-asmlib-on-multi-path.html
Similar Messages
-
How to copy the linux command output to the clipboard xclip is not working?
Friends,
OS: OEL 5.5
i want to copy the command output to the clipboard.
so, which rpm i have to install?
i tried with xclip rpm its not working...
xclip /etc/sysctl.conf
but its not working, not only the above command but all the commands of xclip is not working.
so, can anybody suggest me a solution?
thanksi have already tried that...
below is thru the secureCRT terminal
[root@rac1 /]# cat /etc/sysctl.conf | xclip
Error: Can't open display: (null)below is directly from the os
[root@rac1 ~]# vi tet
[root@rac1 ~]# tail -100 /var/log/messages | xclip
[root@rac1 ~]# vi test
[root@rac1 ~]# cat /etc/sysctl.conf | xclip
[root@rac1 ~]# vi test
[root@rac1 ~]# echo 'hello' | xclip
[root@rac1 ~]# vi testEdited by: OraDB on Aug 19, 2012 10:33 AM -
How to? multiline label containing exact system command output
Background info: I'm triggering a system command to display memory utilization. As you know, the "free" linux command displays many lines of text one after the other. It is similar to the mem command used in Window$.
I want to have a label displaying the command output as it is: multiple lines. Just like you see it in the console. I want to mirror whatever comes up on console after executing free from java.
Using html tags won't work out for me in this particular situation. It just doesn't do the trick. Still displays the LAST line of command output with or without html tags.
any ideas? it doesn't have to be a label. It can be anything as long as it works.
Again, as it is, it just displays the last line of the command output
//events will trigger every second
Timer t = new Timer(1000, new ActionListener(){
public void actionPerformed(ActionEvent event)
//determine memory utilization.
String cmd = "free -m";
try {
String line;
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader input =
new BufferedReader
(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
label.setText(line);
input.close();
catch (Exception err) {
err.printStackTrace();
t.start();got it. thanks.
String cmdMem = "free -m -t -o" ;
try {
String lineMem ;
String outputMem = "" ;
Process procMem = Runtime.getRuntime ().exec ( cmdMem ) ;
BufferedReader input =
new BufferedReader
( new InputStreamReader ( procMem.getInputStream () ) ) ;
while ( ( lineMem = input.readLine () ) != null ) {
outputMem = ( lineMem + "\n" ) ;
jTextAreaSystemResourcesOutput.append ( outputMem ) ;
input.close () ;
catch ( Exception err ) {
err.printStackTrace () ;
} -
Sample Command Output of show chassis inventory for CSS
Hi,
I am trying to get a sample command output of "show chassis inventory" for:
CSS 11501
CSS 11503
CSS 11506
Can anyone help?
Thanks in advance.
MikeHi Mchi,
When I use the command: show chassis inventory. I found :
Slot Module Serial
1 CSS5-SCM-2GE F0 JABxxxxxxx
2 CSS5-IOM-2GE E0 JAB08xxxxxx
3 CSS5-IOM-8FE F0 JAB0xxxxxxx
4 CSS503-SM-INT JAB09xxxxxxx
this is the switch fabric module that connects the other modules.
This is an internal module and it can't be removed/replaced.
Use the show chassis command to display a chassis configuration for the CSS. The syntax and options for this command are as follows:
•show chassis - Displays a summary of the chassis configuration.
•show chassis slot number - Displays the operational parameters for a slot in a CSS 11503 or CSS 11506 chassis. Enter an integer value for the chassis slot number.
•show chassis verbose - Displays detailed information about the chassis configuration.
•show chassis flash - Displays the operational and locked Flash software code on the CSS 11501, and the CSS 11503 or CSS 11506 SCM and I/O modules. An asterisk (*) character before a Flash version of code and build number indicates that it is active.
•show chassis inventory - Displays the physical configuration of the CSS including part and serial numbers.
•show chassis session-processors - Displays the weight and power summary of the session processors in the CSS chassis.
CSS11506# show chassis inventory
Chassis Inventory:
Product Name: CSS11506-2AC E0 SW Version: 07.50.1.05s
Serial Number: JAB09xxxxxx Base Mac Address: 00-13-80-37-xx-xx
Slot Module Serial
1 CSS5-SCM-2GE F0 JAB0915xxxx
2 CSS5-SCM-2GE F0 JAB0914xxxx
3 CSS5-SSL-K9 F0 JAB0848xxxx
4 CSS5-IOM-2GE E0 JAB0808xxxx
7 CSS506-SM E0 JAB0911xxxx
8 CSS506-SM E0 JAB0911xxxx
Even a "show chassis verbose" command does not indicate the presence of a GBIC. It shows the Operational Status of a port as "online" whether there is a GBIC installed or not. For example, in the output below Slot 4 has a GBIC installed in port 4/1, but 4/2 is empty:
CSS11506# sho chassis verbose
Configuration for CSS11506-2AC E0:
Product Name: CSS11506-2AC E0 SW Version: 07.50.1.05s
Serial Number: JAB0916xxxx Base Mac Address: 00-13-80-37-xx-xx
Module(s) Found: 6
Power Supplies(s) Found: 2
Fan(s) Found: 3
Slot/SubSlot Operational Locked
1/1 *07.50.1.05 07.40.1.03
2/1 *07.50.1.05 07.40.1.03
3/1 *07.50.1.05 07.40.1.03
4/1 *07.50.1.05 07.20.2.06
Slot Number: 1 Type: CSS5-SCM-2GE F0
Serial Number: JAB0915xxxx Number of Ports: 2
Operational Status: primary
Port Number: 1 Port Name: SCM-2GE
Operational Status online
Port Number: 2 Port Name: SCM-2GE
Operational Status online
Slot Number: 2 Type: CSS5-SCM-2GE F0
Serial Number: JAB0914xxxx Number of Ports: 0
Operational Status: backup
Slot Number: 3 Type: CSS5-SSL-K9 F0
Serial Number: JAB0848xxxx Number of Ports: 0
Operational Status: primary
Slot Number: 4 Type: CSS5-IOM-2GE E0
Serial Number: JAB0808xxxx Number of Ports: 2
Operational Status: primary
Port Number: 1 Port Name: IOM-2GE
Operational Status online
Port Number: 2 Port Name: IOM-2GE
Operational Status online
Slot Number: 7 Type: CSS506-SM E0
Serial Number: JAB0911xxxx Number of Ports: 0
Operational Status: powered-on
Slot Number: 8 Type: CSS506-SM E0
Serial Number: JAB0911xxxx Number of Ports: 0
Operational Status: powered-on
end of buffer.
Maybe you can use "show tech"
HTH
Sachin -
Command output redirect question
Hi guys,
I am putting in a kron function to transfer the command output from all the switches and routers on our network to a tftp server.
I have the kron occurence and policy lists set up the way I want them and have tested the redirection of the command line output to the server.
The problem I have is that I want to back up the switches 3 or 4 times once a week to compare the configs to make sure that no unwanted changes are being made over the course of the month.
Is there a way to use a variable to change the file name when it redirects? Currently when the occurence runs the file modified time on the tftp server changes but the output doesnt append as I had hoped it would, i.e one file having the config copy in to the file over and over.
Thanks for your helpYou might want to consider the built-in Config Archive feature instead of kron. With Config Archive, you can periodically take backups of your config (even to a network server), and you can adjust the filenames using either date or hostname (or both). Check out the documentation at http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gtrollbk.html#wp1100253 for more details.
In addition to Config Archive, you also have the option of going with the Embedded Event Manager. EEM also has a cron feature which will allow you to run CLI commands periodically. Depending on your IOS version, it may be possible to do what you want using a simple EEM applet, or you might have to use a Tcl script policy. More on EEM can be found at http://www.cisco.com/en/US/docs/ios/netmgmt/configuration/guide/nm_eem_overview_ps10592_TSD_Products_Configuration_Guide_Chapter.html .
All that said, most TFTP servers have a security requirement that a file must exist on the server before one can write to it. Therefore, if you try and create new files (i.e. a new file each day), the TFTP server may reject the WRITE REQUEST unless a file with that name already exists. In light of that, you may need to use something like SCP or FTP instead. -
How to Save Command Output to Flash on ASA 8.4
Hi,
I nice easy one for you guys.
How do you save the command output from the CLI to a file on flash?
With IOS, I would normally use a pipe command to redirect to tftp, but the ASA doesn't support this as far as I can tell. As a work around I was thinking I could save the output to flash and then tftp that file off the ASA.
Thanks,
PaulHi Jennifer,
Thanks for your help. I do use this feature at the moment, but I find every break in the output (where you need to hit space to see more) gets recorded which leaves the file quite messy. I usually have to edit the file afterwards so it reads clearly.
I wondered if there is a way for the asa to write the output directly?
Thanks,
Paul -
Hi,
Can anybody describe the following TOP Command output...
==========================================
Tasks: 197 total, 1 running, 196 sleeping, 0 stopped, 0 zombie
Cpu(s): 12.0% us, 0.7% sy, 0.0% ni, 71.8% id, 15.5% wa, 0.0% hi, 0.0% si
Mem: 4147796k total, 4120904k used, 26892k free, 25708k buffers
Swap: 8191992k total, 160k used, 8191832k free, 3624432k cached
4615 root 16 0 54320 15m 5952 S 24 0.4 4:41.11 X
1915 oratest 16 0 923m 620m 485m S 20 15.3 17:09.41 oracle
1730 oratest 16 0 385m 64m 23m S 4 1.6 0:54.07 java
1912 oratest 15 0 23516 9.9m 5368 S 1 0.2 0:36.71 sqlplus
1726 oratest 16 0 385m 64m 23m S 1 1.6 0:03.35 java
1913 oratest 16 0 385m 64m 23m S 1 1.6 0:13.00 java
2135 oratest 16 0 2448 1028 760 R 1 0.0 0:00.13 top
1887 oratest 15 0 689m 23m 21m D 0 0.6 0:20.74 oracle
1 root 16 0 3468 592 504 S 0 0.0 0:01.06 init
2 root RT 0 0 0 0 S 0 0.0 0:00.04 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.03 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:00.04 migration/2
7 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:00.03 migration/3
9 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/3
10 root 5 -10 0 0 0 S 0 0.0 0:00.00 events/0
11 root 5 -10 0 0 0 S 0 0.0 0:00.00 events/1
12 root 5 -10 0 0 0 S 0 0.0 0:00.00 events/2
13 root 5 -10 0 0 0 S 0 0.0 0:00.00 events/3
14 root 5 -10 0 0 0 S 0 0.0 0:00.00 khelper
15 root 15 -10 0 0 0 S 0 0.0 0:00.00 kacpid
================================================
Why it is showing the Memory Free is 26 MB only...
Only one Database is running on this Machine SGA is around 600MB only.....
Why it is showing 26 MB Free of memory ....Can anybody please describe the TOP Command output.....Hi, this doest look too good... " Swap: 8191992k total, 160k used"
this means you'r using some of you'r swap, "25708k buffers" and not becouse of you'r buffers.
try using ps -ef or top ( and sort by memory by hitting "m" ) and search for the process that uses you'r memory. -
Show ip interface brief command output
Hi,
I have seen 'show ip interface brief' command output.
For some interfaces 'method' it is showing 'NVRAM' and for some interfaces it is 'Manual'.
What does it mean?
Regards
SKRhello,
what about CONFIG method. what is the difference between that and manual and how can I change it to CONFIG? this is related to the ASA 5585.
thanks!! -
OSB "Extended command output" preference permanence
There is a per user preference for "Extended command output". When I set that, it only stays set for the duration of the session. If the session times out, or the user logs out and then back in, the preference is reset. I have tested this under Firefox 20-22, IE 9-10, and Chrome 27 - all behave the same and lose the preference setting after the end of the session.
Is there a method to make the preferences persist across sessions? I find the extended command output very useful.
OSB version 10.4.0.2.0The problem is that "admin" was included as a Restore option and it is not a valid Restore / obtar option.
Here are links to the documentation which describe what are valid restore / obtar options:
http://download.oracle.com/docs/cd/E14812_01/doc/doc.103/e12834/osb_filesystem_restore.htm#CJAGECJD
"Optionally, in Restore options, enter one or more obtar options.
For example, -J enables debug output and provides a high level of detail in restore transcripts." A complete list of obtar options is:
http://download.oracle.com/docs/cd/E14812_01/doc/doc.103/e12838/ap_obtar.htm#OBREF362
Donna -
How to append linux shell command output to MariaDB?
That link gave me an idea, I can create an .sql template file with the "insert" query, dump the shell command output to a text file (>), then use "grep" and "sed" to append the desired parts of the command's output file to that .sql file and then execute the .sql file. What do you think?
I haven't done this myself, but it is probably something along the lines of the answer provided in this link:
http://stackoverflow.com/questions/3900496/using-shell-script-to-insert-data-into-remote-mysql-datab...
-
BR0278E Command output of 'LANG=C mt -f /dev/rmt/0m rew
Dear all,
I am facing on problem while doing th Backup volume initialization from DB13 on the error log is mentioned below:
BR0051I BRBACKUP 7.00 (24)
BR0055I Start of database backup: bdywwgym.tib 2008-09-25 17.49.48
BR0484I BRBACKUP log file: /oracle/RD1/DEV/sapbackup/bdywwgym.tib
BR0101I Parameters
Name Value
oracle_sid DEV
oracle_home /oracle/RD1/DEV/102_64
oracle_profile /oracle/RD1/DEV/102_64/dbs/initDEV.ora
sapdata_home /oracle/RD1/DEV
sap_profile /oracle/RD1/DEV/102_64/dbs/initDEV.sap
backup_dev_type tape
tape_copy_cmd cpio
cpio_flags -ovB
cpio_in_flags -iuvB
dd_flags obs=64k bs=64k
dd_in_flags ibs=64k bs=64k
rewind mt -f $ rew
rewind_offline mt -f $ offl
tape_address /dev/rmt/0mn
tape_address_rew /dev/rmt/0m
volume_backup SCRATCH
expir_period 30
tape_use_count 100
exec_parallel 0
system_info devadm/oradev rlsdev HP-UX B.11.31 U ia64
make_info hpia64 OCI_102 Apr 21 2007
command_line brbackup -u / -jid TAPIN20080925174944 -i force -c force -n 1 -v SCRATCH
BR0477I Oracle pfile /oracle/RD1/DEV/102_64/dbs/initDEV.ora created from spfile /oracle/RD1/DEV/102_64/
BR0205I Backup volume initialization
BR0058I BRBACKUP action ID: bdywwgym
BR0059I BRBACKUP function ID: tib
BR0102I Following backup device will be used: /dev/rmt/0mn
BR0131I All volumes get the name SCRATCH
BR0129I Force option set - no label checking during initialization
BR0134I Unattended mode with 'force' active - no operator confirmation allowed
BR0207I Volume in device: /dev/rmt/0mn will be initialized with name: SCRATCH
BR0280I BRBACKUP time stamp: 2008-09-25 17.49.49
BR0226I Rewinding tape volume in device /dev/rmt/0m ...
BR0278E Command output of 'LANG=C mt -f /dev/rmt/0m rew':
/dev/rmt/0m: No such device or address
BR0280I BRBACKUP time stamp: 2008-09-25 17.49.49
BR0279E Return code from 'LANG=C mt -f /dev/rmt/0m rew': 1
BR0213E Winding tape volume in device /dev/rmt/0mn failed
BR0219E Initialization of volume SCRATCH in device /dev/rmt/0mn failed
BR0206I End of backup volume initialization
BR0280I BRBACKUP time stamp: 2008-09-25 17.49.49
BR0054I BRBACKUP terminated with errors
Kindly help.Dear Karan,
Thanks a lot for replying please check the output.
lsdev -Cc tape
tape - invalid major number
usage: lsdev [-h] [-d driver | -C class] [-b block_major] [-c char_major]
[-e major] [major] ...
Regards,
Manish -
Regarding getting metastat command output
Hi,
I am facing some problems while getting metastat command output. Basically in some scenario's the output format for device is shown in CnTnDn format. But for some other metadevices its shown as /de/dsk/CnTnDn format. How can i achieve getting Device info in only one format? Attached is the output. Here d42 Device is shown in c1t1d0s4 format and d1023 is being shown as "/dev/dsk/c6t50060E8003F64A19d5s7".
d42: Submirror of d40
State: Needs maintenance
Invoke: metasync d40
Size: 10247232 blocks (4.9 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t1d0s4 0 No Okay Yes
d1023: Concat/Stripe
Size: 113798880 blocks (54 GB)
Stripe 0: (interlace: 2048 blocks)
Device Start Block Dbase Reloc
/dev/dsk/c6t50060E8003F64A19d5s7 0 No Yes
/dev/dsk/c6t50060E8003F64A19d6s7 1440 No Yes
Regards,
Shivaraj
email: [email protected]Hi wrightrp,
Thanks for replying. This info was very helpfull for me.
But it looks we are little bit diverted from original problem. Basically I was having trouble in identifying "Device" format in my script. If you look at my example metastat output, for d42 the "Device" info was shown as "c1t1d0s4" but for d1023 its shown as "/dev/dsk/c6t50060E8003F64A19d5s7" So i am worried about why for some metadevices its just shown as CTD format and why some others its shown as "/dev/dsk/CTD" format? For d1023 /dev/dsk is coming extra. Any help/info on this will be much appriciated.
Regards,
Shivaraj -
Help needed extracting information from command output using sed
I want to be able to pipe the output of:
playerctl metadata
into sed and extract only the relevant information. I have a working knowledge of regular expressions but I'm not how to get sed to only output the matched text. For reference, this is an example output of the playerctl command:
{'mpris:artUrl': <'http://open.spotify.com/thumb/ddf652a13affe3346b8f65b3a92bd3abfdbf7eca'>, 'mpris:length': <uint64 290000000>, 'mpris:trackid': <'spotify:track:0xqi1uFFyefvTWy0AEQDJ7'>, 'xesam:album': <"Smokey's Haunt">, 'xesam:artist': <['Urthboy']>, 'xesam:autoRating': <0.23000000000000001>, 'xesam:contentCreated': <'2012-01-01T00:00:00'>, 'xesam:discNumber': <1>, 'xesam:title': <'On Your Shoulders'>, 'xesam:trackNumber': <6>, 'xesam:url': <'spotify:track:0xqi1uFFyefvTWy0AEQDJ7'>}%
I'm trying to get the track name and artist name and combine them into one string. Perhaps sed isn't the tool for the job but I'm not really sure what else to try. Any help is very appreciated.If that was valid json, which it doesn't appear to be, you could use jshon to query it.
Are you sure that is the exact output of the command? It looks sort of off...
In the meatime, this is pretty hacky:
awk 'BEGIN { RS=","; FS="'\''" }; /artist/ { artist = $4 }; /title/ { title = $4 } END { print artist": "title }' file
Urthboy: On Your Shoulders -
Question on top command output in solaris
Platform : Solaris 5.10
In the top output, if you look at the CPU colum, you can see that one process (2415) is consuming 95.84 % of CPU, another process (28533) is consuming 91.81%. How can this happen ? If one process is consuming 95.84 , then less 5% of CPU is available to all other processes . Right?
load averages: 4.24, 4.02, 3.89; up 57+10:17:11 14:36:35
252 processes: 245 sleeping, 1 zombie, 6 on cpu
CPU states: 40.7% idle, 46.7% user, 12.6% kernel, 0.0% iowait, 0.0% swap
Memory: 16G phys mem, 1002M free mem, 31G swap, 31G free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
2415 oracle 1 0 0 6267M 6182M cpu 45.7H 95.84% oracle -------- ???
28533 oracle 2 0 0 5245M 5166M cpu 88:23 91.81% oracle -------- ???
12062 oracle 2 0 0 5245M 5166M cpu 194:39 82.03% oracle
3459 oracle 1 0 0 1380K 996K cpu 9:55 73.00% gzip
2276 oracle 2 35 0 5244M 5165M sleep 0:16 12.84% oracle
13629 oracle 2 33 0 5244M 5165M sleep 4:51 12.44% oracle
7784 oracle 2 32 0 5349M 5270M sleep 1:51 11.85% oracle
5217 oracle 1 100 -20 5248M 5154M sleep 17.5H 3.05% oracle
5225 oracle 1 100 -20 5248M 5154M sleep 17.3H 2.87% oracle
14569 oracle 1 100 -20 6273M 6175M sleep 28.0H 1.61% oracle
14565 oracle 1 100 -20 6271M 6173M sleep 28.8H 1.56% oracle
1052 root 44 59 0 61M 36M sleep 319:29 1.41% crsd.bin
15734 oracle 3 0 0 33M 12M sleep 591:32 1.11% tnslsnr
5237 oracle 2 59 0 5275M 5181M sleep 79:47 0.51% oracle
5235 oracle 2 59 0 5271M 5177M sleep 81:17 0.44% oracleI think you are right. This machine has 8 CPUs and there are 15 lines in the output . May be each line in the top result is for each core.
Result of psrinfo showing the number of CPUs
$ /usr/sbin/psrinfo
0 on-line since 04/12/2011 09:19:34
1 on-line since 04/12/2011 09:19:42
2 on-line since 04/12/2011 09:19:44
3 on-line since 04/12/2011 09:19:46
4 on-line since 04/12/2011 09:19:48
5 on-line since 04/12/2011 09:19:50
6 on-line since 04/12/2011 09:19:52
7 on-line since 04/12/2011 09:19:54Edited by: Tadeusz on Jun 8, 2011 8:13 AM -
[SOLVED]bash: assign a command output to a variable
EDIT: Sorry, got the solution - the variable was good, I just forgot a "do" in a "for" loop.... Sorry
Hi erveryone.
I'm just starting to learn the basics of bash scripting, and I got a problem assigning the output of a command to a variable, and i keep getting syntax errors...
var=$(cut -d: -f1 foo)
echo $var
A google search gives many different ways to do this, but without better results..
var=`cut -d: -f1 foo`
var="`cut -d: -f1 foo`"
Any idea what I'm doing wrong?
Thanks!
Last edited by haiku (2012-02-01 14:19:00)haiku wrote:var=$(cut -d: -f1 foo)
var=`cut -d: -f1 foo`
The first two are both 'right' (in bash) but the first is the preferred syntax (in bash). I think sh only understands the second. I've never used quotes in a situation like this, but it seems to work. That said, maybe the problem is the command itself, because all variations work for me:
$ cat foo
genmon1a:genmon1b
genmon2:genmon3:genmon4
$ cut -d: -f1 foo
genmon1a
genmon2
$ D=$(cut -d: -f1 foo)
$ echo $D
genmon1a genmon2
$ D=`cut -d: -f1 foo`
$ echo $D
genmon1a genmon2
$ D="$(cut -d: -f1 foo)"
$ echo $D
genmon1a genmon2
$ D="`cut -d: -f1 foo`"
$ echo $D
genmon1a genmon2
It might help if you could give us some of the 'bigger picture' too: what you are trying to do overall, the contents of foo, what you are trying to do with the variable, etc.
Last edited by alphaniner (2012-02-01 14:31:01)
Maybe you are looking for
-
How can i do to watch a movie that already showed download but it doesn't work
hello i have a problem, i download last night a movie from itune, then it showed it would need around 3 hours to download, this morning aparently is done, but i can't open it to watch??
-
.emix files from old sessions causing issues.
Hi. Im trying to open up some old sessions from L9 and am having some issues with .emix files. When it opens it says its found duplicates for 12345.emix files and i choose one of them and click continue. It does this for a few more instruments and th
-
FTP Error in Internet sales during product catalogue replication
Hi all, I am configuring the internet sales for demo purpose on CRM 2007-IDES system, when i am replicating the catalogue to isa it gives error regarding FTP. Please give me the idea if iam using internal system not public ip at this time FTP server
-
Quicktime not loading as a plug-in?
Quicktime is not loading into Firefox 9 ( as well as when running Waterfox) Quicktime v.7.7.1 It doesn't show up in the Plug-ins tab? How can I manually install this?
-
Presentation Server 4.5 - Warning Balloon Display Issue
Hi all, We're experiencing an issue within one of our apps being hosted via Presentation Server/XenApp 4.5. This issue is only happening to a select users, regardless of which server the app is hosted on. For this app, it's being hosted on 2 servers.