10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi guys,
i want command or script to display the content of file from 2nd position to last but one position of a file
abcdefghdasdasdsd
123,345,678,345,323
434,656,656,656,656
678,878,878,989,545
4565656667,65656
i want to display the same above file without first and... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
2. Shell Programming and Scripting
if the first string matches then print the previous line and current line and also print the following lines if the other string search matches.
Input
------
TranTime 2012 10 12
The Record starts here
Accountnumber: 4632473431274
TxnCode 323
TranID 329473242834
ccsdkcnsdncskd... (7 Replies)
Discussion started by: laknar
7 Replies
3. Shell Programming and Scripting
Hi,
Our input xml looks like:
<doc>
<str name="account_id">1111</str>
<str name="prd_id">DHEP155EK</str>
</doc>
- <doc>
<str name="account_id">6666</str>
<str name="prd_id">394531662</str>
</doc>
- <doc>
<str name="account_id">6666</str>
<str... (1 Reply)
Discussion started by: Jassz
1 Replies
4. Shell Programming and Scripting
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
Discussion started by: BSF
7 Replies
5. Shell Programming and Scripting
Hi,
I have list of directory paths in a variable and i want to delete those dirs and if dir does not exist then search that string and get the correct path from xml file after that delete the correct directory. i tried to use grep and it prints the entire line from the search.once i get the entire... (7 Replies)
Discussion started by: dragon.1431
7 Replies
6. Shell Programming and Scripting
I have two files abc.dat and sant.dat (Big file 60k rows)
for every line's 1,4 of abc.dat need to seach if this is present on 28,4 of sant.dat every line.
if its present the output needs to go to bde.dat
Example:
contents abc.dat
aaaa
bbbb
cccc
dddd
contents sant.dat
this is... (4 Replies)
Discussion started by: ssantoshss
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am on an AIX Unix box and I am trying to search for a string in between specified lines of code when I vi a file. I can use the '/string' to search for the string through out the file, but can we only search in between specific lines.
I can use the below sed command to search for the... (8 Replies)
Discussion started by: coolavi
8 Replies
8. Shell Programming and Scripting
I need to print lines with character S at nth position in a file...can someone pl help me with appropriate awk command for this (1 Reply)
Discussion started by: manaswinig
1 Replies
9. Shell Programming and Scripting
I need to print lines with character S at nth position in a file...can someone pl help me with appropriate awk command for this (2 Replies)
Discussion started by: manaswinig
2 Replies
10. Shell Programming and Scripting
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Discussion started by: daikeyang
9 Replies