10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm new with scripting and I can't seem to figure out what I should do to get the output that I want.
My file content would be below.
ID2|ID3 |ID4|ID5 |
I'm trying to replace the field of ID3 which has a fixed length of 10 characters, for each entry I have placed on a .txt file... (5 Replies)
Discussion started by: asdfghjkl
5 Replies
2. Shell Programming and Scripting
I am trying to use awk to match the NM_ in file with $1 of id which is tab-delimited. The NM_ will always be in the line of file that starts with > and be after the second _. When there is a match between each NM_ and id, then the value of $2 in id is substituted or used to update the NM_. Each NM_... (3 Replies)
Discussion started by: cmccabe
3 Replies
3. Shell Programming and Scripting
Hello, I have the following input data:
A C
AA GG
A G
CG AG
the code I tried:
awk -F" " '{ if ((length($1==1) && (length($2==1))) input_file
is not working, I need the output to be (such that only the columns containing one letter are printed)
A C
A G
Any help would be appreciated! (5 Replies)
Discussion started by: Rabu
5 Replies
4. Shell Programming and Scripting
I have a big file having 100 K lines.
I have to read each line and see at 356 character position whethere there is a word "W" in it. If it is their then don't delete the line otherwise delete it.
There are two lines as one Header and one trailer which should remain same.
Can somebody... (5 Replies)
Discussion started by: mohit kanoongo
5 Replies
5. Shell Programming and Scripting
Hi, i have a file containing nrows and 3cols. i want to cut it in specific length and save output to individual files.
1 2 3
4 5 6
5 8 9
10 11 12
13 14 15
16 17 18
i need to cut the file say every 2 rows and save it in individual file.
01.dat contains
1 2 3
4 5 6
02.dat
7 8 9... (10 Replies)
Discussion started by: ida1215
10 Replies
6. Shell Programming and Scripting
I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work.
Brief overview:
I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies
7. UNIX for Dummies Questions & Answers
We have utility running on Unix which generates Files with records greater than 32760 , (max supported by Mainframe) .Our requirement is to transfer is file to Mainframe .When we ftp the in binary format it automatically wraps it up..so we are good there...
But now we need to zip and send the file... (2 Replies)
Discussion started by: nishantrk
2 Replies
8. Shell Programming and Scripting
HI All,
I have a file with contents like this:
apple
computer
terminal
applecomputernetworkrouterterminalrouter
network
router
applecomputernetworkrouterterminalrouter
I want to remove all lines with length greater than "18 alphabets". Hence, my output should be:
apple
computer... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
9. Shell Programming and Scripting
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Discussion started by: goodbenito
2 Replies
10. Shell Programming and Scripting
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
Discussion started by: Issemael
5 Replies