10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I want to add backslash and apostrophe to variable in my bash script.
I have my variable:
USER_LIST=USER1,USER2,USER3
and I want something like this:
USER_LIST_DEL=/'USER1/',/'USER2/',/'USER3/'
any ideas ?? (1 Reply)
Discussion started by: primo102
1 Replies
2. UNIX for Dummies Questions & Answers
I have text file which is a tab delimited one. Sample data from the file is shown below:
unix is\ great\ os
linux\ is superb
I want to replace that backslash with empty string preserving the tab delimiter. Output should be
unix is great os
linux is ... (3 Replies)
Discussion started by: p.akhilreddy4u
3 Replies
3. UNIX for Advanced & Expert Users
Why does this work when grepping for a backslash?
grep '\\' .bash_history
grep "" .bash_historyWhy does this not work when grepping for a backslash?
grep "\\" .bash_historyI know this works works but just don't understand why I need 4 backslashes when using double quotes.
grep "\\\\"... (7 Replies)
Discussion started by: cokedude
7 Replies
4. UNIX for Dummies Questions & Answers
Hello everyone,
My main objective is to search for text within a file, namely a block of text where each line ends with a backslash "\".
However, the block must begin with a keyword, like "loginstring".
Here is an example of a file that contains a block:
###############
loginstring \... (2 Replies)
Discussion started by: idlechatter
2 Replies
5. Shell Programming and Scripting
Hi,
Can any one help how to handle the below situation.
Am using Awk script to handle variable
When I open the file in VI mode, I see the string as Orange~Rs , but when I cat the file its showing as plain Oranges.
When I copied the file over to Windows, am seeing the special character... (3 Replies)
Discussion started by: sp999
3 Replies
6. Shell Programming and Scripting
hyper link- abc:8081/xyz/2.5.6/rtyp-2.5.6.jar
Needs to get "rtyp-2.5.6.jar" i.e character after last backslash "/"
how to do this using sed/awk??
help is highly appreciated. (7 Replies)
Discussion started by: kkscm
7 Replies
7. Shell Programming and Scripting
I have a few .tex files generated with html2latex. They have some extra \\ that generate error with pdflatex, so I would like to get rid of them.
This
perl -p -i -e s/\\\\//g myfile.tex
with or without simple or double quote remove all of the backslashes, also the single ones needed by tex.
How... (2 Replies)
Discussion started by: ahsog
2 Replies
8. UNIX for Dummies Questions & Answers
I am looking for a file with 'MCR0000000716214' in it. I tried the following command:
grep MCR0000000716214 *
The problem is that the folder I am searching in has over 87000 files and I am getting the following:
bash: /bin/grep: Arg list too long
Is there any command I can use that can... (6 Replies)
Discussion started by: runnerpaul
6 Replies
9. 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
10. UNIX for Dummies Questions & Answers
Hi guys,
I have the following grep command in a script to search through a file for a string and return its count, and it works fine for when the string exists:
grep "string" file.txt | wc
However, sometimes the result will be 0 and I want the script to take this as the result. Right now... (6 Replies)
Discussion started by: ocelot
6 Replies