Search Results

Search: Posts Made By: SusanDAC
8,857
Posted By SusanDAC
Fixed
Sorry, a typo on my part was causing the problem.

Thanks for your help,

Susan
8,857
Posted By SusanDAC
Sorry the file is still not being recognised
Thanks to both of you but unfortunately I am still getting the error message "grep: 0652-033 Cannot open ." for both of your options. I tried ${vOracount} but that made no difference.

I also...
8,857
Posted By SusanDAC
Grep to return a code from accessing variable file name
All I want to do is find out if the string 'NO' is in a file by checking for a return code of 0 if there is a match. The grep works fine on the command line directly naming the file but I am...
1,765
Posted By SusanDAC
Recommended reading to understand syntax
Do you have any recommendations for books to read or websites to visit that cover syntax information about when to use square brackets, brackets, braces, apostrophes, quotation marks etc. in a shell...
25,270
Posted By SusanDAC
Solved
An extra \ does the job.

sed "${vLineNumber}c\\
replacement text" "$vScriptName" > $vScriptName2

I got the idea from Re: Illegal variable name & carriage return...
25,270
Posted By SusanDAC
Back to not recognising the line return?
I tried
sed "${vLineNumber}c\
.run logon.txt" "$vScriptName" > $vScriptName2

and received this message

sed: 0602-404 Function 3c.run logon.txt cannot be parsed.

vLineNumber is...
25,270
Posted By SusanDAC
Using variables in the expression
Sorry to be a pain but I now want to use a variable instead of a line number in my script and I am getting nowhere fast with combinations of " and ' and `.

What would be the correct way to write...
25,270
Posted By SusanDAC
SOLVED!!!! Thank you
That's great - it works a treat. Thank you very much.

All the best,

Susan
25,270
Posted By SusanDAC
More suggestions, please
I get
sed: 0602-404 Function 3c "replacement txt" cannot be parsed.

for sed '3c "replacement txt"' filename.txt

Regards,

Susan
25,270
Posted By SusanDAC
More thoughts please
I have now - the response was
sed: 0602-404 Function 3creplacement txt cannot be parsed.

I put your script

>sed 3c"replacement txt" filename.txt

directly into the command line

Is...
25,270
Posted By SusanDAC
What syntax to use with sed c\
I know that I want to entirely replace line 3 in my file filename.txt. I have tried all sorts of variations of

sed 3,3,c\replacement stuff\ filename.txt with no success.

about the only thing...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 08:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy