03-02-2013
You have single quote within double quote, does not work. cmd1="$( sed -n '1p' cmd)"
Space after the $ gives problem disk1="$ (sed -n '1p' disk)"
This have one back ticks not two comm="$cmd1 $disk1"`
Last edited by Jotne; 03-02-2013 at 11:25 AM..
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
OK... I'm fairly new to unix having the admin handed to me on a platter w/almost no training.
However, being a programmer, I do pick up things fairly easily, but this one is getting the best of me.
I have a unix server that runs multiple versions of the same ERP system, hand crafted for our... (1 Reply)
Discussion started by: chimodel
1 Replies
2. UNIX for Dummies Questions & Answers
Hello all:
I have a following textfile data with name inst1.txt
HDR|ABCD|10-13-2008 to 10-19-2008.txt|10-19-2008|XYZ
DTL|H|5464-1|0|02-02-2008|02-03-2008||||F|||||||||
DTL|D|5464-1|1|02-02-2008|02-03-2008|1||JJJ
DTL|D|5464-1|2|02-02-2008|02-03-2008|1||JJJ... (9 Replies)
Discussion started by: ravi0435
9 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to replace a field in a text delimited file with the actual number of records in the same file.
HDR|ABCD|10-13-2008 to 10-19-2008.txt|10-19-2008|XYZ
DTL|0|5464-1|0|02-02-2008|02-03-2008||||F|||||||||
DTL|1|5464-1|1|02-02-2008|02-03-2008|1||JJJ... (3 Replies)
Discussion started by: ravi0435
3 Replies
4. Shell Programming and Scripting
Hi Guys I have a question about filling up an array
I have a file called USER_FILE.txt
it contains the following:
Real Name:Thomas A Username:THOMAS_A
Real Name:Thomas B Username:THOMAS_B
Real Name:Thomas C Username:THOMAS_C
Real Name:Thomas D Username:THOMAS_D
Real Name:Thomas E... (8 Replies)
Discussion started by: grahambo2005
8 Replies
5. Shell Programming and Scripting
I have a string of commands I am piping some data through and I want to allow command line switches to select which commands are used. I want to do something like this: OPTION="| command3"
command1 -a -b c.txt | command2 -d -e $OPTION >result.txt
I want to do it that way because OPTION may be... (1 Reply)
Discussion started by: KenJackson
1 Replies
6. Shell Programming and Scripting
hello all
i request you to give the solution for the following problem..
I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print
g
go
goo
goog
googl
google
like this Using unix Shell scripting...
without using... (1 Reply)
Discussion started by: samupnl
1 Replies
7. UNIX for Dummies Questions & Answers
hi i am having issues with extra pipe.
i have a data file and i need to remove the extra pipe in the(example 4th and 7thline) in datafile. there are many other line and filed like this which i need to remove from files. The sample data is below:
270 31|455004|24/03/2010|0001235|72
271... (3 Replies)
Discussion started by: abhi_n123
3 Replies
8. Shell Programming and Scripting
Hello,
I am trying to make a bash script that can pull data from a file and then change one part of said data.
I want to search by username and pull the full line. That way there is a way to replace just one part of that line then return it back to the file.
My Data is stored like:
... (1 Reply)
Discussion started by: serverfull
1 Replies
9. Shell Programming and Scripting
this is Korn shell unix.
The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Discussion started by: vasan2815
4 Replies
10. Linux
Hello,
I have standard loop
while read -r info; do
command $info
done < info
in info text file I have multiple commands each on line that I want to execute. When I used them in console they worked, but not with this loop.
This is one of the commands in info file:
grep... (4 Replies)
Discussion started by: adamlevine
4 Replies
LEARN ABOUT SUNOS
raidctl
raidctl(1M) System Administration Commands raidctl(1M)
NAME
raidctl - RAID hardware utility
SYNOPSIS
raidctl -c disk1 disk2
raidctl -d disk1
raidctl [-f] -F filename controller...
raidctl -l [controller...]
DESCRIPTION
The raidctl utility creates, deletes, or displays RAID volumes of the LSI1030 HW Raid controllers that include RAID support. The utility
also updates firmware/fcode/BIOS for both RAID and non-RAID controllers.
The raidctl utility requires privileges that are controlled by the underlying file-system permissions. Only privileged users can manipulate
the RAID system configuration. If a non-privileged user attempts to create or delete a RAID volume, the command fails with EPERM.
Without options, raidctl displays the current RAID configuration on all exisiting controllers.
OPTIONS
The following options are supported:
-c disk1 disk2 (for on board)
Create a mirror using disk1 and disk2. Replace the contents of disk2 with the contents of disk1. Specify disk1 and disk2 in canonical
form, for example, c0t0d0.
When you create a a RAID volume, the RAID volume assumes the identity of the first target in the disk pair (disk1). The second target
(disk2) disappears from the system. Therefore, the RAID volume appears as one disk.
To have a successful RAID creation, there must not already be a RAID configuration present on the specified controller. Additionally,
the secondary disk must not be mounted, as it has all its data erased and replaced with the primary disk's data.
-d disk1 (for on board)
Delete the RAID volume specified as disk1.
Specify disk1 in canonical form, for example, c0t0d0.
-f (for HBA)
Force an update. Do not prompt.
-F filename controller (for HBA)
Update the firmware running on the specified controller (controller).
-l [controller ...] (for on board)
List the system's RAID configuration. If controller is specified, list RAID configurations for controller.
Output from the -l lists the following information:
RAID Volume Displays logical RAID volume name.
RAID Status Displays RAID status as either RESYNCING (disks are syncing), DEGRADED RAID is operating with reduced functionality),
OK (operating optimally), or FAILED (non-functional).
RAID Disk Displays RAID disk name.
Disk Status Displays disk status as either OK or FAILED.
EXAMPLES
Example 1: Creating the RAID Configuration
The following command creates the RAID configuration:
# raidctl -c c0t0d0 c0t1d0
RAID Volume 'c0t0d0' created
Example 2: Displaying the RAID Configuration
The following command displays the RAID configuration:
# raidctl
RAID RAID RAID Disk
Volume Status Disk Status
----------------------------------------
c0t0d0 RESYNCING c0t0d0 OK
c0t1d0 OK
Example 3: Deleting the RAID Configuration
The following command deletes the RAID configuration:
# raidctl -d c0t0d0
RAID Volume 'c0t0d0' deleted
Example 4: Updating Flash Images on the Controller
The following command updates flash images on the controller:
# raidctl -F lsi1030.fw 0
Update flash image on controller 0? (y/N): y
Flash updated successfully
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 Invalid command line input.
2 Request operation failed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
System Administration Guide: Basic Administration
SunOS 5.10 17 Aug 2004 raidctl(1M)