10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to add word in last of particular line.
the same command syntex is running on prompt. but in bash script give error."sed: -e expression #1, char 20: unterminated address regex"
Please help.
for i in `cat servername`;
do
ssh -q -t root@$i sed -i '/simple_allow_groups =/s/$/,... (4 Replies)
Discussion started by: yash_message
4 Replies
2. Shell Programming and Scripting
I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine.
... (23 Replies)
Discussion started by: rbadveti
23 Replies
3. Shell Programming and Scripting
Hi,
Iam a newbie to SED. I'm faced with a problem as described.
Given the file with text
1 rwerwerwe rere
2 fdfefefe fsdfds
3 rerere ffff trtrt
4 aaaa 1234 asadsdsd
5 hfjfjfjsjfsf... (14 Replies)
Discussion started by: SShinde
14 Replies
4. Shell Programming and Scripting
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Discussion started by: anand.shah
8 Replies
5. Shell Programming and Scripting
Hi Folks,
In my program, I have a variable which consists of multiple lines. i need to use each line as an input. My intention is to extract the email address of the user in each line and use it to process further.
The email address could be anywhere in the whole line. But there will be only... (5 Replies)
Discussion started by: ragz_82
5 Replies
6. UNIX for Dummies Questions & Answers
I have list of data I have cut down to format:
I am using sed command to remove the sed 's/
Returns error:
sed: -e expression #1, char 5: unterminated `s' command
Full code line is:
cat textFile | cut -d ' ' -f 4 | cut ':' -f 1 | sed 's/
Thanks,
Please use next time code tags... (2 Replies)
Discussion started by: maximus73
2 Replies
7. Shell Programming and Scripting
I have read many threads, but I still didn't find the right answer. May be i didn't find the right thread, though are so many threads for the same question.
Basically the situation is - find date in a file and replace it with another date. (its not homework, its part of lot of a big processing,... (10 Replies)
Discussion started by: avinthm
10 Replies
8. Shell Programming and Scripting
Hi,
I have been trying to get various sed statements to work. I thought I had cracked it when suddenly I start recieving these messages
"sed: -e expression #1, char 14: unterminated 's' command"
It happens on any sed statement I now run. The only thing I have done inbetween trying to get... (0 Replies)
Discussion started by: mcclunyboy
0 Replies
9. Shell Programming and Scripting
Hi there,
I'm pretty new to this whole scripting thing. I've written myself something which takes my txt file of SMSes (the backup from the phone), and puts them into an email format, saving them as .eml files. I've tested and uploaded a batch to gmail, but because of threading issues, I've... (1 Reply)
Discussion started by: donnacha
1 Replies
10. Shell Programming and Scripting
I have a current code working(named subst1) having a user be able to type this line to substitute words using the sed command:
subst1 old-pattern new-pattern filename
Here is my shell script:
#!/bin/bash
# subst1
ARGS=3
E_BADARGS=65
if
then
echo "Usage: `basename $0`... (1 Reply)
Discussion started by: Todd88
1 Replies