10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an input file with
I would want the value in Second Field (xyz or pqr) updated with a value present in Shell Variable based on the value passed in the first field. (A or B )
while read line
NEW_VALUE = `some functionality done on $line`
If $line=First Field-... (1 Reply)
Discussion started by: infernalhell
2. Shell Programming and Scripting
Hi I have a text file with lines beginning with 71303, 71403, 71602,
I need to copy the 10 digit text at position 30 on lines beginning with 71303 (5500011446) to position 99 on every line beginning with 71602 (see example below),
There may be many 71303 lines but I need the text copying to... (2 Replies)
Discussion started by: firefox2k2
3. Shell Programming and Scripting
I need to search a file for a pattern,replace some other word and write a word at its 72nd position.
My name is Mano.Im learning Unix.
I want to search the file in all lines containing the word "Mano".In that matched line,replace the word "Unix" with "Java".And... (5 Replies)
Discussion started by: mano1 n
4. Shell Programming and Scripting
I am trying to find/grep the 5th and 6th position character (TX) of a word in a file. I tried to do
grep "....TX" file
The output gives me everything in the file with TX in it. I only need the output with the TX in the 5th and 6th position of the word. Any idea
test1 car... (5 Replies)
Discussion started by: e_mikey_2000
5. Shell Programming and Scripting
Let say I have a file which has around 400 fields.
How is it possible to find out which field is TIME_LAST_VISITED_BY_MD?fro example by seeing the above structure we can saw FACILITY... (5 Replies)
Discussion started by: machomaddy
6. UNIX for Dummies Questions & Answers
I am new to unix. I want to delete 2 words placed at position say for example at 23rd and 45th position in a line. I used sed but couldnt achieve this.
Example: the file contains 2 lines
12345 98765 "12345" 876
12345 98765 "64578" 876
I want to delete " placed at position 13 and 19... (4 Replies)
Discussion started by: nbks2u
7. Shell Programming and Scripting
I'm new to shell scripting and hence this query.
I have 2 files. temp.txt and config.txt.
The values in temp.txt are tab separated.
AB CDE GHIJ OPQRS WXY
ex:config.txt (1st line for 1st element of temp.txt and so on)
start = '1' end='5'
start = '6' end =... (26 Replies)
Discussion started by: subhrap.das
Can anybody please tell me how we can copy and paste text from a word document into a text file that we are editing in vi? Is it possible to do that while we are editing the text file in vi in insert mode?
Thanks, (3 Replies)
Discussion started by: Pouchie1
9. Shell Programming and Scripting
To trim 3rd field in for all the lines of a file and replace the modified string in that particular field.
For example i have a file called Temp.txt having content
So the modified file output should... (4 Replies)
Discussion started by: rpadhi
10. Shell Programming and Scripting
I have a file like this : "window 1 truck 3 duck 2... fire 1... etc..." and I would like to print the following number of a word I am searching for. (For example here, if I search for the word "fire", I will print "1")
Thank you for your help ! (7 Replies)
Discussion started by: tibo