10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position?
I am asking this because the file I have doesn't always follow a pattern.
For example the file I have is the result of a command to obtain windows ACLs:
icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 Replies
2. Shell Programming and Scripting
Hi guyz i want to know nth position of character in string. For ex.
var="UK,TK,HK,IND,AUS"
now if we see 1st occurance of , is at 3 position, 2nd at 6,..4th at 13 position.
1st position we can find through INDEX, but what about 2nd,3rd and 4th or may be upto nth position. ?
In oracle we had... (2 Replies)
Discussion started by: Jonty Immortal
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
let's say an input looks like:
A|C|C|D
A|C|I|E
A|B|I|C
A|T|I|B
as the title of the thread explains, I am trying to get something like:
1|A=4
2|C=2|B=1|T=1
3|I=3|C=1
4|D=1|E=1|C=1|B=1
i.e. a count of every character in each field (first column of output) independently, sorted... (4 Replies)
Discussion started by: beca123456
4 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement to search for a pattern in each line in a file and remove the in between words till the 3rd occurrence of double quote (").
Ex: CREATE TABLE "SCHEMANAME"."AMS_LTV_STATUS"
(Note: "SCHEMANAME" may changes for different schemas. Its not a fixed value)
I need to... (2 Replies)
Discussion started by: satyaatcgi
2 Replies
5. Shell Programming and Scripting
Hi,
i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command.
thanks in advance,
Sara (9 Replies)
Discussion started by: Sara183
9 Replies
6. Shell Programming and Scripting
Greetings.
I have a file with information like this:
AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?
AMNDHRKEEU?AMNDHREOEU?
AMNDHREU?AHRKEOEU?AMNDHRKEU?AMNDKEOEU?
What I need to extract is the position, in every line, of every occurrence of '?'
A desired output would be something... (6 Replies)
Discussion started by: Twinklefingers
6 Replies
7. Shell Programming and Scripting
how to find character positionin file?
i.e
string = "123X568"
i want to find the position of character "X".
Thanks (6 Replies)
Discussion started by: LiorAmitai
6 Replies
8. Shell Programming and Scripting
Hello. I'm trying to delete one character in determinate position.
Example:
qwEtsdf123Ecv34
<delete character in positión 3>
Result:
qwtsdf123Ecv34
Plase, help me.
Thanks (4 Replies)
Discussion started by: maria_florencia
4 Replies
9. UNIX for Dummies Questions & Answers
Hi, I'm trying to find the position of a series of numbers within a large text file. The numbers are separated by spaces.
This works fine:
type Huge_File.txt | gawk "{print index($0,"255")}"
But this does not:
type Huge_File.txt | gawk "{print index($0,"188 028 239 160 016 190 137... (4 Replies)
Discussion started by: Lemming42
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am a newbie in unix programming so maybe this is a simple question.
I would like to know how can I make a script that outputs only the values that are not between any given start and end positions
Example
file1:
2 30
40 80
82 100
file2:
ID1 1
ID2 35
ID3 80
ID4 81
ID6... (9 Replies)
Discussion started by: fadista
9 Replies