10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following script that will print column 4 ("25") when column 1 contains "123". However, I need to ignore the alpha characters that are contained in the input file. If I were to ignore the characters my output would be column 3.
What is the best way to print my column of interest... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
2. Shell Programming and Scripting
Hi,
I would like to find a 3-letter character series in a string/variable and replace it with x's.
An example set of strings is:
563MS333_101_afp_400-100_screening
563MS333_104-525_rjk_525_screening
563MS333_110_dlj_500-100_w24
563MS333_888-100_mmm_424_screening
The only constants... (5 Replies)
Discussion started by: goodbenito
5 Replies
3. Shell Programming and Scripting
Need command for position based replace:
I need a command to replace with 0 for characters in the positions 11 to 20 to all the lines starts with 6 in a file.
For example the file ABC.txt has:
abcdefghijklmnopqrstuvwxyz
6abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz... (4 Replies)
Discussion started by: thangabalu
4 Replies
4. Shell Programming and Scripting
Here is my problem:-
I have a file with pipe separated values.
CR|20121021|079|ABC|N|DLS|00038|DLS|04750|1330597704|634234|634|0
CR|20121021|079|ABC|N|DLS|00038|DLS|05118|2071690102|354|351|3
CR|20121021|079|ABC|N|DLS|00038|DLS|05140|960051505|1088|1088|0... (4 Replies)
Discussion started by: Yoda
4 Replies
5. Shell Programming and Scripting
Hi i have data like
abchd 124 ldskc aattggcc
each separated by tab space i want to count number of characters in 4th column and print it in new column with tabspace for every line can anyone help me how to do it.
Thanks. (3 Replies)
Discussion started by: bhargavpbk88
3 Replies
6. Shell Programming and Scripting
Suppose that I have a string "one:#red two:#yellow three:#gr'een four:#blu^e" and I want to replace the pattern :# and the following characters in the word with nothing. The output string should look "one two three four" How can I do this with sed.
Some points to consider (a) the last word in... (1 Reply)
Discussion started by: superuser84
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I would like to take the first column of a bunch of lines and take only the 6th through 15th characters. The first column are not regular.
gbAY277147.1Ptv3.T1469 CTTGAACAT
gbAY277149.1Ptro3.T1469 CTTGAACAT
gbAY287891.1Hs3.T1469 CTTGAACATTTGC
into
7147.1Ptv3 CTTGAACAT... (4 Replies)
Discussion started by: mikey11415
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I've been trying to replace the numbers in the first column of my text file with all ones, unless the number is equal to 8. I have this:
1 1 11 123 258
2 1 9 135 175
1 1 15 143 274
8 1 13 153 172
8 1 13 154 166
8 1 13 154 167
3 1 15 237 255
4 1 15 243 202
1 1 13 133 166... (4 Replies)
Discussion started by: goodbenito
4 Replies
9. UNIX for Dummies Questions & Answers
HI All
I need a shell script ehich removes all special characters from file and converts the file to UTF-* format
Specail characters to be removed must be configurable.
strIllegal = @"?/><,:;""'{|\\+=-)(*&^%$#@!~`";
Please help me in getting this script as my scripting skilla are... (2 Replies)
Discussion started by: sujithchandra
2 Replies
10. UNIX for Dummies Questions & Answers
Can I get some help on this please, I have looked at the many post with similar questions and have tried the solutions and they are not working for my scenario which is:
I have a text file (myfile) that contains
b_log=$g_log/FILENAME.log
echo "Begin processing file FILENAME " >> $b_log
... (4 Replies)
Discussion started by: CAGIRL
4 Replies