10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello. I'm self teaching myself and coded a program but I keep getting a illegal division by 0 error. I know what it means but I don't know where I am messing up.
Here is the code:
#!/usr/bin/perl
@lines = <>;
my %earned;
my %possible;
for ($i = 1; $i <... (6 Replies)
Discussion started by: Eric7giants
6 Replies
2. Shell Programming and Scripting
I have the logic below to look up for matches within the columns between the two files with awk.
In the if statement is where the string comparison is attempted with ==
The issue seems to be with the operands, as
1. when " '${SECTOR}' " -- double quote followed by single quote -- awk matches... (1 Reply)
Discussion started by: deadyetagain
1 Replies
3. Shell Programming and Scripting
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Discussion started by: pchang
32 Replies
4. UNIX for Dummies Questions & Answers
Hi Guys,
When I am executing the script
#! /bin/bash
SARBACKUPS=/home/pradeep/sarBackups
cd /var/log/sysstat
ls -1t sar* | while read SARNAME
do
cp -p "$SARNAME" $( echo "$SARBACKUPS"/"$HOSTNAME"_"$SARNAME"_"`date +"%Y%m%d`.bkup )
done
I am getting
final.sh: 1: Syntax... (3 Replies)
Discussion started by: Pradeep_1990
3 Replies
5. Shell Programming and Scripting
I need to remove double quoted strings from specific lines in a file. The specific line numbers are a variable. For example, line 5 of the file contains
A B C "string"
I want to remove "string". The following sed command works:
sed '5 s/\"*\"//' $file
If there are multiple... (2 Replies)
Discussion started by: rennatsb
2 Replies
6. Shell Programming and Scripting
Hi,
I have a script output.sh which produces the following output (as an example):
"abc def" "ghi jkl"
This output should be handled from script input.sh as input and the quotes should be treated as variable delimiters but not as regular characters.
input.sh (processing positional... (2 Replies)
Discussion started by: stresing
2 Replies
7. 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
8. Shell Programming and Scripting
I keep having problems when exicuting this file. It always gives me the error message "36: Syntax error: Unterminated quoted string"
If someone could help me edit this it would be much appreciated.
#!/bin/sh
#
# This will continue adding numbers
# untill the total is greater than 1,000
#... (5 Replies)
Discussion started by: evilSerph
5 Replies
9. Shell Programming and Scripting
Hi
I need to update a string inside a file which looks like the following:
PX_LIST=" 4119 2390 2294 2776 2897 4099 "
Is there a way to get rid of the blanks after the first quote mark and before the last quote mark.
This needs to be done ONLY for the string named PX_LIST (there are some... (4 Replies)
Discussion started by: aoussenko
4 Replies
10. UNIX for Dummies Questions & Answers
While running a shell script i am getting this warning but the script is working fine.while running the blocks of the scripts individually its running fine.But while pasting it combinedly this is the warning..wat may be the reason behind this and how to resolve it (3 Replies)
Discussion started by: dr46014
3 Replies