Sponsored Content
Top Forums Shell Programming and Scripting Command to extract all columns except the last few from a txt file Post 302761953 by madrazzii on Sunday 27th of January 2013 01:54:23 PM
Old 01-27-2013
Thank you. But i still get my target text file with the multiple rows from source file in one row in target file. i checked to see if the word wrap option is disabled and i doesn't make a difference.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command to list .txt and .TXT file

Hi expersts, in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log I want list only .txt and .TXT files in one command... how to ?? //purple (1 Reply)
Discussion started by: thepurple
1 Replies

2. UNIX for Dummies Questions & Answers

Adding EMPTY columns to Tab-delimited txt file

Hi I have a txt file with 4 columns where I need to add 4 empty columns in the middle meaning that I need what is currently column 4 to be column 8 in a new file. The idea is that I have to use the file as input in a program that reads the data in column 1 and 8, so the content of the other... (8 Replies)
Discussion started by: Banni
8 Replies

3. Shell Programming and Scripting

Extract from txt file

I have data as follow in the txt file. I want to skip line starting with '#' sign. #command program abc defmt exp refmt ... ... I want to store abc exp .... in a array. I want to store defmt refmt in a array I need command to read each line in the file. I need... (6 Replies)
Discussion started by: ekb
6 Replies

4. Shell Programming and Scripting

extract columns from command output

I need to extract information (for example, file owner, directory path, etc). However, the code below does not work? What is wrong? find /usr/local/www/apache22/data/dev/chown_test -ls for i in * do cut -f 1,2 "$i" | echo done (3 Replies)
Discussion started by: montana24
3 Replies

5. UNIX for Dummies Questions & Answers

Extract numbers from .txt file

I need to extract all the p-value numbers and the rho numbers from a .txt file and write them as coma separated values in a new file. Ideally I would get two files in the end, one for p- values and one for rho. Any suggestions? I appreciate your help!!! The .txt file looks essentially like this... (5 Replies)
Discussion started by: eggali
5 Replies

6. Shell Programming and Scripting

To transpose columns + edit in a txt file

Hi, I have a txt file that looks like log2FoldChange Ontology_term 8.50624450251828 GO:0003700,GO:0003707,GO:0005634,GO:0006355,GO:0043401,GO:0003700,GO:0005634,GO:0006355,GO:0008270,GO:0043565 7.03936870356684 GO:0005515,GO:0008080 6.49606183738682 6.49525073909629 GO:0005515... (4 Replies)
Discussion started by: alisrpp
4 Replies

7. Shell Programming and Scripting

Script extract text from txt file with grep

All, I require a script that grabs some text from the gitHub API and will grep (or other function) for a string a characters that starts with (") quotes followed by two letters, may contain a pipe |, and ending with ) . What i have so far is below but it's not returning anything. ... (4 Replies)
Discussion started by: ChocoTaco
4 Replies

8. Shell Programming and Scripting

Extract information from txt file

Hello! I need help :) I have a file like this: AA BC FG RF TT GH DD FF HH (a few number of rows and three columns) and I want to put the letters of each column in a variable step by step in order to give them as input in another script. So I would like to obtain: for the 1° loop:... (11 Replies)
Discussion started by: edekP
11 Replies

9. Shell Programming and Scripting

Match Columns in one file and extract columns from another file

Kindly help merging information from two files with the following data structure. I want to match for the CHR-SNP in Foo and get the columns that match from CHROM-rsID Fields 1 & 2 of foo may have duplicates, however, a joint key of Fields $1$2$3$4 is unique. Also would be helpful to clean up... (4 Replies)
Discussion started by: genehunter
4 Replies

10. UNIX for Beginners Questions & Answers

To extract values after the maximum value in a txt file

Hello, I'm new to scripting and I need to write a bash script. Here is example of file on which I'm working: 0.3092381 0.3262799 0.3425480 0.3578379 0.3719490 0.3846908 0.3958855 0.4053738 0.4130160 0.4186991 0.4223357 ... (1 Reply)
Discussion started by: jeo_fb
1 Replies
TARGETS(5)						      BSD File Formats Manual							TARGETS(5)

NAME
targets -- configuration file for iSCSI targets SYNOPSIS
targets DESCRIPTION
The targets file describes the iSCSI storage which is presented to iSCSI initiators by the iscsi-target(8) service. A description of the iSCSI protocol can be found in Internet Small Computer Systems Interface RFC 3720. Each line in the file (other than comment lines that begin with a '#') specifies an extent, a device (made up of extents or other devices), or a target to present to the initiator. Each definition, an extent, a device, and a target, is specified on a single whitespace delimited line. The extent definition specifies a piece of storage that will be used as storage, and presented to initiators. It is the basic definition for an iSCSI target. Each target must contain at least one extent definition. The first field in the definition is the extent name, which must begin with the word ``extent'' and be followed by a number. The next field is the file or NetBSD device which will be used as persistent storage. The next field is the offset (in bytes) of the start of the extent. This field is usually 0. The fourth field in the definition is the size of the extent. The basic unit is bytes, and the shorthand KB, MB, GB, and TB can be used for kilobytes (1024 bytes), megabytes (1024 kilobytes), gigabytes (1024 megabytes), and terabytes (1024 gigabytes) respectively. It is possible to use the word ``size'' to use the full size of the pre-existing regular file given in the extent name. The device definition specifies a LUN or device, and is made up of extents and other devices. It is possible to create hierarchies of devices using the device definition. The first field in the definition is the device name, which must begin with the word ``device'' and be followed by a number. The next field is the type of resilience that is to be provided by the device. For simple devices, RAID0 suffices. Greater resilience can be gained by using the RAID1 resilience field. Following the resilience field is a list of extents or other devices. Large devices can be created by using multiple RAID0 extents, in which case each extent will be concatenated. Resilient devices can be cre- ated by using multiple RAID1 devices or extents, in which case data will be written to each of the devices or extents in turn. If RAID1 resilience is used, all the extents or sub-devices must be the same size. Please note that RAID1 recovery is not yet supported by the iscsi-target(8) utility. An extent or sub-device may only be used once. The target definition specifies an iSCSI target, which is presented to the iSCSI initiator. Multiple targets can be specified. The first field in the definition is the target name, which must begin with either of the words ``target'' or ``lun'' and be followed by a number. Optionally, if a target is followed by an ``='' sign and some text, the text is taken to be that of the iSCSI Qualified Name of the target. This IQN is used by the initiator to connect to the appropriate target. The next field is a selector for whether the storage should be pre- sented as writable, or merely as read-only storage. The field of ``rw'' denotes read-write storage, whilst ``ro'' denotes read-only storage. The next field is the device or extent name that will be used as persistent storage for this target. The fourth field is a slash-notation netmask which will be used, during the discovery phase, to control the network addresses to which targets will be presented. The magic val- ues ``any'' and ``all'' will expand to be the same as ``0/0''. If an attempt is made to discover a target which is not allowed by the net- mask, a warning will be issued using syslog(3) to make administrators aware of this attempt. The administrator can still use tcp wrapper functionality, as found in hosts_access(5) and hosts.deny(5) to allow or deny discovery attempts from initiators as well as using the inbuilt netmask functionality. FILES
/etc/iscsi/targets the list of exported storage targets SEE ALSO
syslog(3), hosts.deny(5), hosts_access(5), iscsi-target(8) HISTORY
The targets file first appeared in NetBSD 4.0. BSD
December 18, 2007 BSD
All times are GMT -4. The time now is 03:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy