10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In the awk below I am trying to add a | that will adjust $2 in the ouput by adding +1 if the original value from file that was used in $3 had a - in it. Line 3 of file is an example of this. In my current awk I just subtract one but I am not sure how to only apply this to those values without a -.... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. Shell Programming and Scripting
Hi All,
I want to create a new file based on certain conditions and copy only those conditioned data to new file.
Input Data is as it looks below.
ORDER|Header|Add|32|32|1616
ORDER|Details1.........
ORDER|Details2.........
ORDER|Details3.........
ORDER|Details4............ (10 Replies)
Discussion started by: grvk101
10 Replies
3. Shell Programming and Scripting
Hello:
I need to copy down some data from the previous record in to the next record based on the below conditions
If position 41- 59 of the current record is same as the previous record and the value of position 62 is not equal to 1 then
copy the previous records value for positions... (1 Reply)
Discussion started by: techedipro
1 Replies
4. Shell Programming and Scripting
hi
i have an input file that contains some thing like this
aaa acc aa abc1 1232 aaa abc2....
poo awq aa abc1 aaa aaa abc2
bbb bcc bb abc1 3214 bbb abc3....
bab bbc bz abc1 3214 bbb abc3....
vvv ssa as abc1 o09 aaa abc4....
azx aaq aa abc1 900 aqq abc19....
aaa aa aaaa abc1 899 aa... (8 Replies)
Discussion started by: anurupa777
8 Replies
5. Shell Programming and Scripting
Hi, Gurus,
I got a problem to resolve following issue:
I have one file file1as following:
start_dt=2010-01-01 12:00:02
start_dt=2011-01-01 09:00:02
start_dt=2009-01-01 11:00:02I have another file file2 as following:
title1, 2010-01-03 10:00:02
title2, 2011-01-04 11:00:02
title3,... (5 Replies)
Discussion started by: ken002
5 Replies
6. Shell Programming and Scripting
Hello!
Please, help me write this simple script using bash scripting.
Task:
In Folder1 I have files:
name1.txt, name2.txt, name3.txt .. etc
In Folder2 may located such files:
name1.txt, name2.txt .. etc
In Folder3 may located files like:
name1.txt_abc{some_symbols}_vxz,... (6 Replies)
Discussion started by: optik77
6 Replies
7. Shell Programming and Scripting
Hello,
I have File1 in a directory A, a File2 in a directory B.
If the File2 is not empty
Then I have to move File1 from directory A to a directory archive
Else no action.
Is it possible to do this from one command line?
Thank you in advance for your answers.
Madi (2 Replies)
Discussion started by: AngelMady
2 Replies
8. Shell Programming and Scripting
Sorry Guys for not being able to explain in one of my earlier post.
I am now putting my requirement with the input file and desired output file.
In the below input file -
Transaction code is at position 31:40.
Business code is from position 318:321
TSCM00000005837 ... (7 Replies)
Discussion started by: varunrbs
7 Replies
9. Shell Programming and Scripting
I need only those records which has $2 equal to "DEF" independent of case (i.e upper or lower)
nawk -F"," '$2 ~ //{print $0}' file
This returns 3rd record also which i dont want
I tried this but this doesnt work as expected.
nawk -F"," '$2 == ""{print $0}' file
i dont... (3 Replies)
Discussion started by: pinnacle
3 Replies
10. Shell Programming and Scripting
Hi,
I have a comma separated file with millions of records in it.
I have a requirement to split the file based on the value in a one of the columns.
Suppose i have a text file with columns like C1, C2,C3,C4
Column C4 can hold the values either 01 or 02 03 or 04.
I nned to extract... (2 Replies)
Discussion started by: Raamc
2 Replies