10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
My sample file is variable length, with out any field delimiters. It has min of 18 chars length and the 'CRLF' is potentially between 12-14 chars. How do I replace this with a space? I still want to keep end of record, but just want to remove these new lines chars in the middle of the data.
... (7 Replies)
Discussion started by: chandrath
2. Shell Programming and Scripting
I am looking for a specific situation in a text file. The conditions are,
I am looking for cases where the line "> <CompoundName>" is followed by a line that contains the string "InChI=" without regard to... (5 Replies)
Discussion started by: LMHmedchem
3. UNIX for Dummies Questions & Answers
I have several questions about using awk. I'm hoping someone could lend me a hand. (I'm also hoping that my questions make sense.)
I have a file that contains pipe separated data. Each line has similar data but the number of fields and the field position on each line is variable. ... (3 Replies)
Discussion started by: Cheese64
4. Shell Programming and Scripting
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
5. Shell Programming and Scripting
Hi Unix experts
I have simple text files in which the number of lines vary from one file to another. They look like the following:
I want to grab the first number of the last line of each file (let's say A= 39 in the above example), which is... (2 Replies)
Discussion started by: nxp
6. Shell Programming and Scripting
Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11
Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
7. Shell Programming and Scripting
how to print any required line by its line no using awk and its NR variable
requied o/p if give num=3 it print:
-------------------------------------- (2 Replies)
Discussion started by: RahulJoshi
8. Shell Programming and Scripting
I've got a configuration file that is filled with xml text statements for example:
<data id="java-options" value="-server -Djava.security.policy..../>
I want to write a korn shell script that will go to this specific line and add a... (2 Replies)
Discussion started by: progkcp
9. Shell Programming and Scripting
Create a file with x amount of lines in it, the content of your choice.
Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
Discussion started by: ali hussain
10. Shell Programming and Scripting
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Discussion started by: r1500