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
It is ok when I send send one arguement to $TILL in the awk expression.
first(){
TILL=$1
echo $TILL
awk '/:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /'$TILL'\/ {P=1} ' ${dirlist
}
}
echo "<table border = '1'>"
echo '<tr><td> </td><td>' ;... (3 Replies)
Discussion started by: alvinoo
3 Replies
4. Shell Programming and Scripting
Greetings..
getting the error while execution of the script, correct where i am missing
#!/bin/bash
DATE=`date +%Y-%m-%d:::%H:%M`
HOSTNAME=`hostname`
TXT="/log/temp.txt"
LOGPATH="/log1/commanlogs/"
IP=`/sbin/ifconfig | grep -i inet| head -n1| awk '{print $2}'| awk -F : '{print $2}'`... (7 Replies)
Discussion started by: manju98458
7 Replies
5. 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
6. UNIX for Advanced & Expert Users
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies
7. 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
8. UNIX for Dummies Questions & Answers
Hi
I am having a 'grep' headache
Here is the contents of my file:
(PBZ,CP,(((ME,PBZ,BtM),ON),((ME,((PBZ,DG),(CW9,PG11))),CW9,TS2,RT1)))
I would like to count out how many times 'PBZ' occurs and then place that number in the line above
3... (8 Replies)
Discussion started by: cavanac2
8 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
Hi All,
I am trying to use a sed command in a shell script in order to delete some lines in a file and I got the following error message.
I don't understand why it is not working 'cause I have tried with simple quotes, then with double-quotes, and it is not working.
sed: -e expression #1,... (7 Replies)
Discussion started by: Alpha3363
7 Replies