10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line.
*****Original Log*****
087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)
Discussion started by: rajeshlinux2010
3 Replies
2. 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
3. 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
4. UNIX for Beginners Questions & Answers
Hi there,
I'm trying to create a script that will accept multiple inputs by copying and pasting the strings from a notepad, hit Enter key and output the string to a text file.I'm thinking of using the read command however it will just simply get the first line.
Apologies but got no idea how... (7 Replies)
Discussion started by: norbie.lopez
7 Replies
5. Shell Programming and Scripting
Greetings Experts,
As part of automating the sql generation, I have the source table name, target table name, join condition stored in a file join_conditions.txt which is a delimited file (I can edit the file if for any reason). The reason I needed to store is I have built SELECT list without... (5 Replies)
Discussion started by: chill3chee
5 Replies
6. Shell Programming and Scripting
It looks like if matching and deleting the last line confuses 'sed' so it does not recognize '$' address. Consider:
sed -e '/^3/d' -e '$ a text'
supposed to delete a line starting with '3' and then append 'text' after the last line of input. But, if it is the last line of input which starts... (2 Replies)
Discussion started by: msz59
2 Replies
7. 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
8. Shell Programming and Scripting
Hello all, I have been asked to exercise my shell scripting and it has been 10 plus years since I used to do it so I can not remember hardly anything and ask for your help.
What I need to do is copy a line out of a file that can be 10 to 100 characters long, I then need to parse this line into... (3 Replies)
Discussion started by: Alivadoro
3 Replies
9. UNIX for Dummies Questions & Answers
I want something that would show up basically like:
Menu
-----
1) Option 1
2) Option 2
3) Option 3
Pick one:
I tried menu = " Menu \r\n ----- \r\n 1)Option 1 \r\n..............etc etc etc"
but that didnt work (just got the whole menu one one line, with the... (2 Replies)
Discussion started by: SoVi3t
2 Replies
10. Shell Programming and Scripting
Hi,
I am using #!/bin/sh shell. I have a variable which contains multi line data. I want to read that variable line by line. Can someone post the code to read the multi line variable line by line?
Any help is much appreciated. (2 Replies)
Discussion started by: gupt_ash
2 Replies