10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI Team,
I have script to find the invalid character in file.
f=’pallvi\mahajan’
n=0
while (( $n <= ${#f} ));
do
c="${f:$n:1}"
echo '$c'
if *] ]];
then
grep -sq $c valid.txt
if ;
then
echo "$f" >> f.txt
break
fi
fi (18 Replies)
Discussion started by: pallvi_mahajan
18 Replies
2. Shell Programming and Scripting
Hello
how to find last occurence of a string
for example in the following I want last occurence of '-' i.e. position 12
str="aa-bbb-cccc-ddd-ee"
my pupose is to get the string 'ee'
Thanks and Regards
Chetanz (5 Replies)
Discussion started by: Chetanz
5 Replies
3. 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
4. Shell Programming and Scripting
Hi,
In a error log file, the error code of a particular error contains both Alphabet and Numbers. My problem statement is to find the error codes from a particular log. That means, I need to search a word, which contains both alphabet and number. Please help me. Below is two examples of error... (1 Reply)
Discussion started by: snehasish_jana
1 Replies
5. UNIX for Dummies Questions & Answers
Hello, Experts,
I have a file with the first and second column connected together, and i want to use vi to seperate them (put a space in between).
Is there any command in vi would put a space after the 7th letter?
Thanks!
example:
0.981101.517
2.944101.517
4.907101.517 (10 Replies)
Discussion started by: wingsy1212
10 Replies
6. Shell Programming and Scripting
I was trying to do some experiment with "sed".
I want to find the filenames which are three characters. So, this is what I have done to search for it, using sed.
sed -n -e '/^\{3\}$/p' test
This returns the correct output for characters. But if I make change, let's say i create 2 more... (4 Replies)
Discussion started by: aksijain
4 Replies
7. Shell Programming and Scripting
Hi Team,
i have 1st cloumn of data containing,
LAMSBA01-BA-COFF-YTD
LAMSBA01-BA-COFF-ITD
LAMSBA01-BA-AGGR-IND .
LAMSBA01-BA-CURR-COFF-BAL
i need to replace the "-" to "_" (underscore) using AWK .
please help me on this.
Thanks,
Baski (4 Replies)
Discussion started by: baskivs
4 Replies
8. Shell Programming and Scripting
Hi Experts,
Is there a way to find whether a file contains ^M character in it?. It's quite obvious to vi, but can this be accomplished using an automated way to find recursively in a directory.
probably i guess the best way would be to
1) Read the file and check if the end of line is ^M... (8 Replies)
Discussion started by: ganga.dharan
8 Replies
9. Shell Programming and Scripting
Hello,
I have a UNIX file in which data is like this --
ISA*00* *00* *01*006415160 *01*137361242 ... (3 Replies)
Discussion started by: The Observer
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I would like to use grep to find files which contain NULL characters. I'm not sure how to represent the null character in the grep statement.
Could anyone help please?
Thanks!
Helen :confused: (5 Replies)
Discussion started by: Bab00shka
5 Replies