some help with the sed command please

hi all,

attached you can find a small txt file ( [config].txt ),
GIVEN that past_scheduler="islip" and scheduler="mucf"
can somebody please tell me
WHY sed 's/-u '$past_scheduler'/-u '$scheduler'/g' [config].txt > [config].txt.temp fails ?

thanx

Hi,

The pattern '-u...islip' does not occur in your file.

'islip' only appears on line 9:

         Algorithm       islip -n 4

Removing the '-u ' from the pattern works fine.

hth,
dv

thanx, i was careless enough :slight_smile:

i would like to ask you if you know how can i make the following message :
mkdir: <folder_name>: File exists
not to be displayed, when i run the script ?
( i conditionally create some folders when necessary, but it wuld be nice if i get rid of this message, is that possible ? )

Hi OneDreamCloser,

mkdir -p /path/to/folder/to/create

This will:

  1. Not prompt if existing
  2. Create parent directories if necessary