Search Results

Search: Posts Made By: Danette
12,451
Posted By Danette
Scheduling job using UNIX "at" command
Am using the at command to schedule a task.


at now + 30 minutes
warning: commands will be executed using /bin/sh
at> /home/hagbard/chaos/iosafe120/sh/ocr.sh -dns 200 *.pdf<EOT>
job 1 at Sat...
11,758
Posted By Danette
Sure head could work. However I would have to...
Sure head could work. However I would have to specify a file name. It will not behave same way as when using grep for searching all files.
11,758
Posted By Danette
Grep first n lines from each file
I am using




grep --include="*.org" --include="*.texi" -hir -C 8 "Abstract" ./




Now I would simply like to print the first n lines from each file without searching for any pattern.
3,522
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...
3,522
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.
3,522
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.
3,522
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.
3,522
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...
1,779
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
1,779
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
3,413
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...
13,725
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
13,725
Posted By Danette
I want to avoid changing the other lines with...
I want to avoid changing the other lines with @ptpar and @ctpar.
13,725
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{@//'...
13,208
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.
13,208
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/,/^...
13,208
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{}...
13,208
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

...
4,640
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...
4,640
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.
4,640
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...
4,135
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
4,135
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 23 of 23

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