10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have requirement to search for a text in the file and retrieve required lines that is user defined with unix command.
Eg:
Find the text UNIX in the below file and need to return Test 8 & Test 9
Test 1
Test 2
Test 3
Test 4
UNIX
Test 5
Test 6
Test 7
Test 8
Test 9
Result can... (8 Replies)
Discussion started by: Arunkumarsak4
8 Replies
2. Shell Programming and Scripting
I want to rearrange the fields of delimited text file after sorting first line (only):
input file:
a_13;a_2;a_1;a_10
13;2;1;10
the result should be:
a_1;a_2;a_10;a_13
1;2;10;13
any help would be appreciated
andy (20 Replies)
Discussion started by: andy2000
20 Replies
3. Shell Programming and Scripting
Hi,
I have a huge unsorted text file. We wanted to identify the unique field values in a line and consider those fields as a primary key for a table in upstream system.
Basically, the process or script should fetch the values from each line that are unique compared to the rest of the lines in... (13 Replies)
Discussion started by: manikandan23
13 Replies
4. Shell Programming and Scripting
I have the below contents in a file after making the below curl call
curl ... | grep -E "state|Rno" | paste -sd',\n' | grep "Disconnected" > test
"state" : "Disconnected",, "Rno" : "5554f1d2"
"state" : "Disconnected",, "Rno" : "10587563"
"state" : "Disconnected",, "Rno" :... (2 Replies)
Discussion started by: Vaibhav H
2 Replies
5. Shell Programming and Scripting
I have a file of ~500,000 entries in the following:
file.txt
chr1 11868 12227 ENSG00000223972.5 . + HAVANA exon . gene_id "ENSG00000223972.5"; transcript_id "ENST00000456328.2"; gene_type "transcribed_unprocessed_pseudogene"; gene_status "KNOWN"; gene_name "DDX11L1"; transcript_type... (17 Replies)
Discussion started by: cmccabe
17 Replies
6. Shell Programming and Scripting
Sample txt file :
OK00001111112|
OK00003443434|skjdaskldj
OK32812983918|asidisoado
OK00000000001|
ZM02910291029|sldkjaslkjdasldjk
what would be the shell script to figure out the blank space (if any) after the pipe sign? (4 Replies)
Discussion started by: chatwithsaurav
4 Replies
7. Shell Programming and Scripting
My data is something like shown below.
date1 date2 aaa bbbb ccccc
date3 date4 dddd eeeeeee ffffffffff ggggg hh
I want the output like this
date1date2 aaa eeeeee
I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies
8. Shell Programming and Scripting
i have this file which has the following contents:
,-0.3000 ,-0.3000 ,-0.3000
,-0.9000 ,-0.9000 ,-0.9000
i would like to get this:
-0.3-0.9-0.3-0.9-0.3-0.9
so far i am trying:
awk '{for(i=1; i<=NF; i++) {printf("%f\n",$i)}}' test1 > test2
any help... (4 Replies)
Discussion started by: npatwardhan
4 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix scripting, please help me in solving this assignment..
I have a scenario, as follows:
1. i have a text file(read1.txt) with the following data
sairam,123
kamal,122
etc..
2. I have to write a unix... (6 Replies)
Discussion started by: G.K.K
6 Replies
10. Shell Programming and Scripting
Ive got a file called listacdrs with this structure:
01/09/2006 12:13 p.m. 1.046.528 CF0155.DAT
01/09/2006 12:13 p.m. 1.046.528 CF0156.DAT
01/09/2006 12:13 p.m. 1.046.528 CF0157.DAT
01/09/2006 12:13 p.m. 1.046.528 CF0158.DAT
01/09/2006 12:14 p.m. ... (3 Replies)
Discussion started by: alexcol
3 Replies
vblade-persist(8) System Manager's Manual vblade-persist(8)
NAME
vblade-persist - manage persistent exported ATA-over-Ethernet devices
SYNOPSIS
vblade-persist ls [--no-header]
vblade-persist setup shelf slot netif blockdev
vblade-persist destroy shelf slot
vblade-persist { start | stop | restart | auto | noauto } shelf slot
vblade-persist { start | stop | restart | auto | noauto } all
vblade-persist mac shelf slot { ls | clear }
vblade-persist mac shelf slot { add | del } [ addr ... ]
DESCRIPTION
The vblade-persist script is used to show and manipulate persistently-exported ATA-over-Ethernet devices. It has a simple subcommand syn-
tax.
Persistent AoE device exports can be configured to come up at boot time. For each running persistent AoE export, a symlink pointing to the
backing device is created in /dev/etherd/, mirroring the devices seen by clients of the AoE device.
MANAGEMENT SUBCOMMANDS
ls [--noheader]
vblade-persist ls shows all existing persistent AoE exports. The columns of the output are, in order: AoE Shelf, AoE Slot, Network Inter-
face, Backing Device, AutoStart, Status. AutoStart is either "auto" (start automatically at boot), or "noauto" (don't start automatically
at boot). Status should be either "run" (running) or "down" (not running).
The optional --no-header argument suppresses the header line. This may be convenient for machine-parseable output.
setup shelf slot netif source
vblade-persist setup creates a new persistent exported AoE block device. You must supply all four additional arguments. These are the
same arguments supplied to vblade(8). You should specify source using an absolute path.
New devices set up this way are noauto (not brought up automatically at boot) and down (not exported immediately).
destroy shelf slot
vblade-persist destroy halts any running exported AoE block device managed by vblade-persist and removes the service directory used to man-
age it.
start shelf slot
stop shelf slot
restart shelf slot
These commands control a specific exported AoE device. Instead of specifying shelf and slot , you can also provide the special keyword all
which will act on every exported AoE device.
auto shelf slot
noauto shelf slot
These commands control whether a specific exported AoE device should be started automatically ( auto ) or not ( noauto ) at system boot
time. Instead of specifying shelf and slot , you can also provide the special keyword all which will act on every exported AoE device.
MAC-ADDRESS FILTERING
You can use vblade-persist to restrict access to specific exports by MAC address, using the mac subcommand.
mac shelf slot ls
List all MAC addresses allowed to access the specified device, one per line. If the list is empty, no MAC address limits are imposed on
this device.
mac shelf slot clear
Remove all MAC address filtering from the specified device. No MAC address limits will be imposed on this device.
mac shelf slot add [ addr ... ]
Add a MAC address (or more than one) to the list of allowed addresses for the specified device. Note that if there were no MAC addresses
listed previously, this will enable MAC address filtering for the device.
mac shelf slot del [ addr ... ]
Remove a MAC address (or more than one) from the list of allowed addresses for the specific device. Note that if you remove all the MAC
addresses from the list, this will disable MAC address filtering for the device.
EXAMPLES
Set up /dev/sda2 as shelf 2, slot 3 on the network served by interface eth0. Make sure it starts automatically at boot, and start it up
now:
vblade-persist setup 2 3 eth0 /dev/sda2
vblade-persist auto 2 3
vblade-persist start 2 3
Limit that same export to MAC addresses aa:bb:cc:dd:ee:ff and 11:22:33:44:55:66:
vblade-persist mac 2 3 add aa:bb:cc:dd:ee:ff 11:22:33:44:55:66
Remove all MAC address restrictions on the same export:
vblade-persist mac 2 3 clear
BUGS
You can't currently use the vblade-persist framework to export a device (or two) with the same shelf/slot identifier on two different net-
work interfaces.
DEPENDENCIES
The exports themselves are handled by vblade(8). Supervision of the exports and convenient management is enabled by runsv(8), from the
runit suite.
SEE ALSO
vblade(8), runsv(8)
AUTHOR
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
vblade-persist 2007-11-11 vblade-persist(8)