10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a csv dataset like this :
C,rs18768
G,rs13785
GA,rs1065
G,rs1801279
T,rs9274407
A,rs730012
I'm thinking of use like awk, sed to covert the dataset to this format: (if it's two character, then keep the same)
CC,rs18768
GG,rs13785
GA,rs1065
GG,rs1801279
TT,rs9274407... (7 Replies)
Discussion started by: nengcheng
7 Replies
2. UNIX for Dummies Questions & Answers
I have a file that looks like this:
14985 DPN verb PPa to spend.
12886 DPNDJN bay tree.
15686 DQ verb to observe
15656 KC ... (7 Replies)
Discussion started by: jvoot
7 Replies
3. UNIX for Advanced & Expert Users
hello
i have file with 100k records and each one has certain value that starts at 28th column and certain value that starts at 88th column
e.g. 1st file
<25>1234567 ..... <88> 8573785485
i have aditional file with values which are related to value that starts at 88th column of the... (1 Reply)
Discussion started by: dell1520
1 Replies
4. Shell Programming and Scripting
This is for AIX 6.1, I've a flat file and the format is like this
DECLARE
some statements;
BEGIN
some statements;
END;
I've to search BEGIN and replace it with the following 4 lines
BEGIN
For x in 1..1
LOOP
BEGIN
Similarly I've to search END and replace it with the... (7 Replies)
Discussion started by: Mukul Sharma
7 Replies
5. Shell Programming and Scripting
Hi all,
I am very new to unix - ksh. I want to replace some characters in a file with some other, but only for first three occurances for each line.
For eg:
the first 3 occurances character ']' has to be replaced with ',' in each line.
Please help.
thanks
Sreejith (1 Reply)
Discussion started by: rsreejithmenon
1 Replies
6. UNIX Desktop Questions & Answers
Hi,
I am trying to convert multiple Unix pipe symbol or bar into single |. I have tried with the following sed statements, but, no success :(. I need it using sed only
echo "sed 's/\|\+/\|/g'
sed 's/*/\|/'
sed 's/\|*/|/'
sed -r 's/\|+/\|/'
However, the below awk code is working fine.... (4 Replies)
Discussion started by: royalibrahim
4 Replies
7. Shell Programming and Scripting
Hi All,
Was wondering how I can do the following....
I have a String as follows
"ACCTRL000005022RRWDKKEEDKDD...."
This string can be in a file called tail.out or in a Variable called $VAR2
Now I have another variable called $VAR1="000004785" (9 bytes long), I need the content of... (5 Replies)
Discussion started by: mohullah
5 Replies
8. Shell Programming and Scripting
I already have accomplished this task using sed and arrays, but since I get the variable using awk, I figured I'd ask this question and maybe I can get a cleaner solution using strictly awk.. I just can't quite grasp it in awk.
Story: I'm automating the (re)configuration of network interfaces,... (3 Replies)
Discussion started by: System Shock
3 Replies
9. Shell Programming and Scripting
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies
10. Shell Programming and Scripting
I want to find the number of occurences of a character in a file.
How do i do it.
Eg:
$cat file1.txt
Welcome to World of Unix.
$
If i want to find the occurences of 'o' then I should be getting 3.
Thanks. (6 Replies)
Discussion started by: Shivdatta
6 Replies