Search Results

Search: Posts Made By: Danette
261
Posted By Danette
I want to check if the option is set so I can...
I want to check if the option is set so I can then assign the variable flnm.

But I do not know how I can do it. I expected the -z expressions to work.
--- Post updated at 12:31 AM ---

I have...
261
Posted By Danette
No. I fixed the -z but still getting the error....
No. I fixed the -z but still getting the error. The error line it complains about is a blank line at the end of the script.
261
Posted By Danette
The space when calling bash was a mistake when...
The space when calling bash was a mistake when pasting the code. I have fixed the -z problem. Small mistake when
I was trying various things to try to get things to work out.
261
Posted By Danette
If I put the exit before the if section, I do not...
If I put the exit before the if section, I do not get the error. And the script works when I remove the if section for options.
261
Posted By Danette
Picking script options in bash
I would like to select a particular file by passing an option to a bash script so that I can call another
program to compile an outline of some documents I have

But I am getting an error when...
251
Posted By Danette
Have noticed that using double quotes solves the...
Have noticed that using double quotes solves the problems.


sed -i "s/docTitl/Outline ${docTitl}/g" $ofln





merged from other thread
251
Posted By Danette
Sed variable not expanding
I have also some difficulty calling sed to change a word in a file.


sed -i 's/docTitl/Outline ${docTitl}/g' $ofln


Moved to new thread, since it is a different question
323
Posted By Danette
Extracting filename
I am using bash and have a filename with a path and extension and want to extract just the filename

Have used the following code, oflna gives the file name with extension, but now neet to remove...
Forum: Shell Programming and Scripting 2 Weeks Ago
488
Posted By Danette
That should be it. I also used the following to...
That should be it.
I also used the following to take care of long lines



fold -s temp.txt > temp.fld
fmt -w 72 temp.fld >> $ofln
Forum: Shell Programming and Scripting 2 Weeks Ago
488
Posted By Danette
I want to avoid changing the other lines with...
I want to avoid changing the other lines with @ptpar and @ctpar.
Forum: Shell Programming and Scripting 2 Weeks Ago
488
Posted By Danette
Selecting text on multiple lines, then removing a beginning and end patterns
I have a file similar to the below. I am selecting only the paragraphs with @inlineifset.

I am using the following command


sed '/@inlineifset/,/^ *$/!d;
s/@inlineifset{mrg, @btpar{@//'...
Forum: Shell Programming and Scripting 2 Weeks Ago
508
Posted By Danette
I am going to stop this here as it actually...
I am going to stop this here as it actually answers the original task.
Forum: Shell Programming and Scripting 2 Weeks Ago
508
Posted By Danette
Ok, I found I can also write the commands on...
Ok, I found I can also write the commands on multiple lines


sed '/inlineifset/,/^ *$/!d; s/@inlineifset{mrg, @opar{@bullet{} @//' $flnm


is then rewritten as



sed '/inlineifset/,/^...
Forum: Shell Programming and Scripting 2 Weeks Ago
508
Posted By Danette
It would be good to also remove the ,,,,}} of the...
It would be good to also remove the ,,,,}} of the sections commands.


A command that has also worked is


sed -n '/inlineifset/,/^ *$/p' $flnm |\
sed 's/@inlineifset{mrg, @opar{@bullet{}...
Forum: Shell Programming and Scripting 2 Weeks Ago
508
Posted By Danette
Selecting section and removing match
I have a file with contents as shown in file.texi

Would like to keep only the sections that have inlineifset till the empty line is reached. Finally replace the
following string with a space

...
1,693
Posted By Danette
Sorting by Year, then sorting by Author Name
Almost everything is going well. However I would like to elaborate a bit more. After I sort in reverse order
I end up with the book listed sorted by year, with most recent on top.



But for...
1,693
Posted By Danette
I have included sort -r -t"|" -k3,3 to have...
I have included sort -r -t"|" -k3,3 to have records with recent years to show first.
1,693
Posted By Danette
Sorting a file of book records
I have a texinfo file containing book records and I want to sort them. An example is shown below.
Records are separated by two blank lines. The sort pattern I want to sort is starting from the...
573
Posted By Danette
rename -vn 's/([a-z])(\w+--Diss.pdf)/\u$1$2/g'...
rename -vn 's/([a-z])(\w+--Diss.pdf)/\u$1$2/g' *.pdf
573
Posted By Danette
Renaming Files
I have a directory with a long list of files. I want to change their names such that
the first letter of the name of the author is capitalised.


I have tried the following command and did not...
Showing results 1 to 20 of 20

 

Featured Tech Videos

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