10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
2. Shell Programming and Scripting
Hi,
I have a string wherein i need to replace special characters with backslash and that character.
Ex:
If my string is a=qwerty123@!,
then the new string should be a_new=qwerty123\@\!\,
Thanks (3 Replies)
Discussion started by: temp_user
3 Replies
3. Shell Programming and Scripting
Hi I have around 300 files in a folder. When I type ls -l I see the following
Mouse.chr10_+_:101862321-101863928.maf
Mouse.chr10_+_:101862322-101863928.maf
Mouse.chr10_+_:101862323-101863928.maf
But when I run my scripts, they couldn't recognise the filename because of hidden backslash like... (5 Replies)
Discussion started by: quincyjones
5 Replies
4. Shell Programming and Scripting
Hi All.
I have a file that contains some special characters and I'm trying to use AWK to search for lines between <pattern1> and <pattern2>.
As an example:
I need the lines between the line containing ' select_id="x_0 ' and the line containing the next instance of ' from '. This is a file... (5 Replies)
Discussion started by: Mudshark
5 Replies
5. Shell Programming and Scripting
Hello,
I need to remove ^L character from a file as below:
HELLO "I "
HELLO "I "
^L HELLO "I"
HELLO "I "
HELLO "I "
Please suggest.
Thanks !!
Please use next time code tags for your code and data (9 Replies)
Discussion started by: skhichi
9 Replies
6. UNIX for Dummies Questions & Answers
I am trying to remove the tab character from a file, which occurs on two places in every line. So far I have tried the following and most are from threads in this forum:
sed -i '' -e 's/ / /' file.dat
sed -i '' -e 's/*/ /' file.dat
sed -i '' -e 's/\t*/ /g' file.dat
sed -i '' -e 's/*//g'... (4 Replies)
Discussion started by: figaro
4 Replies
7. Shell Programming and Scripting
I receive a file which is Dos format. When I view the file using vi, I was able to find ^M, ^@ characters in beteen records. I wanted to remove these control/special characters. I used the dos2unix command. This removed the ^M characters. But I am unable to remove the ^@ character. I tried even the... (6 Replies)
Discussion started by: machomaddy
6 Replies
8. Shell Programming and Scripting
Hi All
Please help me to remove the first 2 character from the file name.
files are like this
$ ls
12aman file
13atul si
56rana se
I want to remove the first 2 char which are numbers.
I want the o/p like thus
aman file
atul si
rana se (8 Replies)
Discussion started by: atul9806
8 Replies
9. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
10. Shell Programming and Scripting
Hi ,
I am doing invert grep using -v but the string contain "/" which break the grep command and it do not skip the lines with "/" on it.
Diffu.txt
========
1159c1159
< <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton7466">
---
> <td... (1 Reply)
Discussion started by: rajbal
1 Replies