10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. Shell Programming and Scripting
Does anyone know of a way with C Shell that will work on both Linux and Sun to clear all leading and trailing blanks from a previously specified string? I am using the following code to replace blanks with underscores:
set Company = `echo $Company | sed 's/ /_/g
but I don't want any... (1 Reply)
Discussion started by: phudgens
1 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
Hello!
I wroted a little script that should check for new updates on a server and get them if any. The problem is, every time I run it with sh, I'm getting an "script: 20: Syntax error: Unterminated quoted string" error!
The problem is, there isn't any "unterminated quoted string" in my script:... (2 Replies)
Discussion started by: al0x
2 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 have a file having more then thousand lines.
i want to remove selected lines in it.
And also if there exists two duplicate lines, I want to delete one of them.
Please help me with awk and shell.
:confused: (8 Replies)
Discussion started by: tushar_tus
8 Replies
10. Shell Programming and Scripting
Hi All,
I am new to bash scripting. I need your help to removing spaces from a string and assign them to different variables.
Iwant to call script with one command line argument which is file name which containes different attributes their type and different values eg
... (1 Reply)
Discussion started by: flextronics
1 Replies