10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
2. Shell Programming and Scripting
Hello,
Here is my text data excerpted from the webpage:
input
My target is to get:
What i tried is:
sed 's/.*\(connector\)/1/' input > output
but all characters coming before the word "connector" are deleted which is not good for me.
My question: (9 Replies)
Discussion started by: baris35
9 Replies
3. Shell Programming and Scripting
Example:
while read line
do
stat -c %G $line
done < somefile.txtThe problem is that inside somefile.txt lines can have any symbol allowed as file name, like (). Even with spaces, it splits the words.
somefile.txt:dira/my first jump.avi
dirb/surf video (1080p).mkv (2 Replies)
Discussion started by: Tribe
2 Replies
4. Shell Programming and Scripting
Hi All,
My source file contains special characters(Latin characters).I need to fetch only the lines which contains the special characters. The problem is i don't know which all latin/special characters can come in the source.
Is there anyway to extract the lines which contain letters other... (3 Replies)
Discussion started by: joe!!
3 Replies
5. Shell Programming and Scripting
Hi,
I have a file which has numerous lines and some of the lines having special characters in it. i want to grep the lines which are having special characters.
say,
one line looks like - %*()$#@"", | acbd
antoher line looks like ***##^%! | efcg
so these kind of lines are present... (5 Replies)
Discussion started by: rbalaj16
5 Replies
6. Shell Programming and Scripting
i need to replace the any special characters with escape characters like below.
test!=123-> test\!\=123
!@#$%^&*()-= to be replaced by
\!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies
7. UNIX for Advanced & Expert Users
Hey guys,
I have a file with an ID which I'm using to grep out the original record from another file. Problem is I have special characters in the original file, and grep is returning only a partial record. How can I get around this?
Appreciate your help!
Pete (3 Replies)
Discussion started by: peteroc
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file such as:
---
>contig00001 length=35524 numreads=2944
gACGCCGCGCGCCGCGGCCAGGGCTGGCCCA
CAGGCCGCGCGGCGTCGGCTGGCTGAG
>contig00002 length=4242 numreads=43423
ATGCCGAAGGTCCGCCTGGGGCTGG
CGCCGGGAGCATGTAGCG
---
I would like to concatenate the lines not starting with ">"... (9 Replies)
Discussion started by: s052866
9 Replies
9. Shell Programming and Scripting
When I open a file in vi, I see the following characters:
\302\240
Can someone explain what these characters mean. Is it ASCII format? I need to trim those characters from a file.
I am doing the following:
tr -d '\302\240'
---------- Post updated at 08:35 PM ---------- Previous... (1 Reply)
Discussion started by: sid1982
1 Replies
10. Shell Programming and Scripting
I need to add "new lines" of text with special characters, to specific lines in the file. There are 3 modifications needed. Been testing 2 here without success.
#!/usr/bin/perl
use FileHandle;
$file=FileHandle->new;
$FILENAME="/opt/etc/usr/file.txt";
$file->open ("<$FILENAME") or die... (13 Replies)
Discussion started by: A4ron4perl
13 Replies