Sponsored Content
Top Forums Shell Programming and Scripting Create new file with increment column based on conditions Post 302922246 by shamrock on Thursday 23rd of October 2014 12:09:49 PM
Old 10-23-2014
Can you post what you have done to solve this problem...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

validating a file based on conditions

i have a file in unix in which the records are like this aaa 123 233 aaa 234 222 aaa 242 222 bbb 122 111 bbb 122 123 ccc 124 222 In the output i want only the below records aaa ccc The validation logic is 1st column and 2nd column need to be considered if both columns values are... (8 Replies)
Discussion started by: trichyselva
8 Replies

2. Shell Programming and Scripting

create pipes based on the column

i get text files with Action & Adventure|2012: Supernova NR|2009-11-01 00:01:00|2010-05-01 23:59:00|Active|3 Action & Adventure|50 Dead Men Walking|2010-01-05 00:01:00|2010-06-30 23:59:00|Active|4 Action & Adventure|Afterwards|2009-11-26 00:01:00|2010-03-26 23:59:00|Deactivated|6 Based... (3 Replies)
Discussion started by: ramse8pc
3 Replies

3. UNIX for Dummies Questions & Answers

How to get remove duplicate of a file based on many conditions

Hii Friends.. I have a huge set of data stored in a file.Which is as shown below a.dat: RAO 1869 12 19 0 0 0.00 17.9000 82.3000 10.0 0 0.00 0 3.70 0.00 0.00 0 0.00 3.70 4 NULL LEE 1870 4 11 1 0 0.00 30.0000 99.0000 0.0 0 0.00 0 0.00 0.00 0.00 0 ... (3 Replies)
Discussion started by: reva
3 Replies

4. Shell Programming and Scripting

Create files based on second column of a file

Hi All, I have a file which looks like this: 234422 1 .00222 323232 1 3232 32323 1 0.00222 1234 2 1211 2332 2 0.9 233 3 0.883 123 3 45 As you can see, the second column of the file is already sorted which I did using sort command. Now, I want to create files based on the second... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. Shell Programming and Scripting

Deleting values in a column based on conditions

Hi I have a difficulty in writing shell script for performing the tasks. A B C D 12 230 16 259 18 260 23 283 21 291 36 298 41 309 49 420 52 425 57 450 61 456 70 473 72 475 79 486 If the A(row no.2) < C(row no.1) then delete value A(row no.1) and so on... For... (8 Replies)
Discussion started by: Sarwagya Jha
8 Replies

6. Shell Programming and Scripting

Increment existing column in file

Hi All, I have a file with 3 millions records in which 3rd column is same throughout say its value is 0 throughout.for example: Col1 Col2 Col3 Col4 A 1 0 5 B 2 0 6 C 3 0 7 D 4 0 9 I want my output as : Col1 Col2 Col3 Col4 A 1 ... (4 Replies)
Discussion started by: Pinky456
4 Replies

7. Shell Programming and Scripting

Split File based on different conditions

I need to split the file Conditions: Ignore any record that either starts with 1 or 9 Split the file at position 404 , if position 404 is abc or def then write all the records in a file > File 1 , the remaining records should go in to a file > File 2 Further I want to split the... (7 Replies)
Discussion started by: protech
7 Replies

8. Shell Programming and Scripting

Help with Creating file based on conditions

Can anyone please assist? I have a .txt file(File1.txt) and a property file(propertyfile.txt) . I have to read the vales from the property file and .txt file and create the output file(outputfile.txt) mentioned in the attachment. For each record in .txt file,the below mentioned values shall be... (20 Replies)
Discussion started by: vinus
20 Replies

9. Shell Programming and Scripting

Increment Column having Alphanumeric value in file

I want to replace a column(first and last) having an alphanumeric value in a file. Requirement : 1)All values in a Column must be unique and contain an incremented pattern “HCTV0096” for first column and “cafefeca0090” for last column 2)for uniquely identifying each value in column Numeric part... (6 Replies)
Discussion started by: ketanraut
6 Replies

10. Shell Programming and Scripting

awk to update file based on 5 conditions

I am trying to use awk to update the below tab-delimited file based on 5 different rules/conditions. The final output is also tab-delimited and each line in the file will meet one of the conditions. My attemp is below as well though I am not very confident in it. Thank you :). Condition 1: The... (10 Replies)
Discussion started by: cmccabe
10 Replies
SCSI_START(8)							     SG3_UTILS							     SCSI_START(8)

NAME
scsi_start - start one or more SCSI disks SYNOPSIS
scsi_start [--help] [--verbose] [--wait] DEVICE [DEVICE]* DESCRIPTION
This bash shell script calls the sg_start utility on each given DEVICE. The purpose is to spin up (start) each given DEVICE. OPTIONS
Arguments to long options are mandatory for short options as well. -h, --help print out the usage message then exit. -v, --verbose increase level or verbosity. -w, --wait wait for the spin up (start) on each given DEVICE to complete. The default action is to do each start in immediate mode. NOTES
If a large number of disks are spun up at the same time (i.e. without the --wait option) then the power supply may be overloaded. EXIT STATUS
The exit status of this script is 0 when it is successful. Otherwise the exit status is that of the last sg_start utility called. See the sg3_utils(8) man page. AUTHORS
Written by D. Gilbert COPYRIGHT
Copyright (C) 2009-2013 Douglas Gilbert This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. SEE ALSO
sg_start (sg3_utils) sg3_utils-1.36 May 2013 SCSI_START(8)
All times are GMT -4. The time now is 04:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy