10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi linux expert
how can i find apostrophe (') symbol in text file by grep? for example for find 'test, the command grep " \'test" * is not useful.
Many Thanks
samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies
2. Shell Programming and Scripting
Hi,
i made a gnuplot script which accepts a filename as parameter (using gnuplot -e) now i want to run this script from a shell script, the correct command (with a concrete parameter) looks like this:
gnuplot -e 'name="filename.dat;col=2"' gplscript.gpl
my shell script looks like this:
... (4 Replies)
Discussion started by: franko007
4 Replies
3. Shell Programming and Scripting
I have a file which contains a list of paths separated by a new line character.
e.g
/some/path/to/a/file.png
/some/path to/another/file.jpeg
/some path/to yet/another/file
Notice that these paths may contain metacharacters, the spaces for example are also not escaped.
If I wanted... (5 Replies)
Discussion started by: cue
5 Replies
4. Shell Programming and Scripting
Hi All,
For example, I have some words like these:
cabinet's
school's
field's
you'll
I know how to remove apostrophe from these words using this command:
cat filename | tr -s "\'" ' '
But I am not sure how I can remove the letter followed by the apostrophe, so that my output... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
5. Shell Programming and Scripting
I'm coding using BASH and have a requirement to replace apostrophes with backslash apostrophes. For example below:
I am here 'in my room' ok
Would be changed to:
I am here /'in my room/' ok
The original text is coming from a field in a MySql database and is being used by another process that... (5 Replies)
Discussion started by: dbjock
5 Replies
6. Shell Programming and Scripting
Hi Friends,
I need a sed or awk based script to replace a character(alphabet) with ' (Apostrophe). I tried to use the following two commands
1) sed -e 's/a/'/' filename
2) awk '{sub("a","'",$1);print}' filename
but both got failed.
Any help on this.
Thanks in advance.. (3 Replies)
Discussion started by: ks_reddy
3 Replies
7. Shell Programming and Scripting
I'm having a strange problem with escaping double-quotes. I have a script that looks like this:
#!/bin/bash
for HOST in `cat $INFILE | grep -v ^#`
do
for VFILER in `some_command`
do
echo " "
echo -e '\E
The problem with ssh command... (3 Replies)
Discussion started by: GKnight
3 Replies
8. Shell Programming and Scripting
hi there. i have a simple bash script that reads a word from a text file
one at a time, and if a '*' character is encountered, it prints a message.
however it doesn't work as i expected. :o what am i doing wrong here?
thanks very much for the help :)
for word in `cat $DOC`
do
if... (18 Replies)
Discussion started by: mark_nsx
18 Replies
9. Shell Programming and Scripting
When trying to escape special character * - it doesn't seem to work. In korn shell trying to store a local variable as follows
sample=test*
echo $sample - gets all the file names starting with test* , instead i want to literally store the value test* into a variable. I tried escaping with \, with... (3 Replies)
Discussion started by: prekida
3 Replies
10. Solaris
When trying to escape special character * - it doesn't seem to work. In korn shell trying to store a local variable as follows
sample=test*
echo $sample - gets all the file names starting with test* , instead i want to literally store the value test* into a variable. I tried escaping with \, with... (1 Reply)
Discussion started by: prekida
1 Replies