10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
OS: Redhat
Version 7.5 Enterprise
Trying to post message from shell script to Slack channel and trying below code:
text="$msg"
text1="$lmsg"
if ]
then
echo "No text specified"
exit 1
fi
escapedText=$(echo $text | $text1 | sed 's/"/\"/g' | sed "s/'/\'/g" )... (13 Replies)
Discussion started by: onenessboy
13 Replies
2. Shell Programming and Scripting
Input File:
>Seq1
ASDADAFASFASFADGSDGFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSD
>Seq2
SDASDAQEQWEQeqAdfaasd
>Seq3
ASDSALGHIUDFJANCAGPATHLACJHPAUTYNJKG
......
Desired Output File
>Seq1
ASDADAFASF
ASFADGSDGF
SDFSDFSDFS
DFSDFSDFSD
FSDFSDFSDF
SD
>Seq2 (4 Replies)
Discussion started by: patrick87
4 Replies
3. Shell Programming and Scripting
Hello,
Currently, I am reading few queries from the below .sql file
--SOURCE TABLE NAME
--SOURCE QUERY
SEL COL1, COL2, COL3, COL4,
COL5, COL6, COL7 WHERE COL5 = '2015-11-04 16:24:00.000000' FROM SOURCE TABLE;
--TARGET TABLE NAME
--TARGET QUERY
SEL COLUMN1, COLUMN2, COLUMN3, COLUMN4,... (4 Replies)
Discussion started by: ronitreddy
4 Replies
4. Shell Programming and Scripting
Hi All,
I am copying a file from windows to UNIX. After that copying it have the ctrl+M character in the file at the line break. But the file contains the data that also have ctrl+M. I want to re move the ctrl+M at the end of the line alone.
My file structure is XML and last line doesnt... (3 Replies)
Discussion started by: Agantrope
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am trying to remove multi line and single line comments like examples below
I have tried this pattern. it works fine for single line comments and multi line comments in a single line only. but this fails when the comments are extended in multiple lines as shown in the comment 2 of... (3 Replies)
Discussion started by: ahmedwaseem2000
3 Replies
6. Shell Programming and Scripting
I have tried a lot, Need your help guys.
SAS Program:
data one ; /* Data step */
Input name $; /*Dec variables*/
I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and... (6 Replies)
Discussion started by: saaisiva
6 Replies
7. UNIX for Dummies Questions & Answers
I have tried a lot, Need your help guys.
SAS Program:
data one ; /* Data step */
Input name $; /*Dec variables*/
I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and... (1 Reply)
Discussion started by: saaisiva
1 Replies
8. Shell Programming and Scripting
I have a file with data records separated by multiple equals signs, as below.
==========
RECORD 1
==========
RECORD 2
DATA LINE
==========
RECORD 3
==========
RECORD 4
DATA LINE
==========
RECORD 5
DATA LINE
==========
I need to filter out all data from this file where the... (2 Replies)
Discussion started by: Finja
2 Replies
9. Shell Programming and Scripting
:) Hi all,
I would like to remove all multiple line comments, in between the pattern /*.....*/ from my file.
The comments can be expected to be at any place in my file, like this:
/*....
This multi line comment might stretch even the entire file..!
......*/
Some text
Text1 /* Comment... (25 Replies)
Discussion started by: Jackuar
25 Replies
10. Shell Programming and Scripting
I'm doing manual way to add and remove "#" on etc/services.
Is there anyway I can modify the file using awk or sed or any other program.
I use vi to modify /etc/services for enabling telnet , the problem is I don't know how to do it automatically in script.
production state:
#telnet
... (9 Replies)
Discussion started by: skully
9 Replies