« first day (552 days earlier)      last day (2497 days later) » 

4:59 AM
@Queen k
@Queen k
@Queen k
@icodes what do you mean by "linked"?
@aashish_soni louigi600 posted a for loop above which is basically the way to do it
 
 
5 hours later…
9:51 AM
you don't need to edit manually ... you can save your scripts and use sed to manipulate them ... if something goes very wrong and sed doing something unintended you have your tarball with the original scripts (or whatever you prefer) ... if the scripts are on a versioning software like git or subversion you could just simply rollback your changes and start over again till you get sed to do the right thing
 
10:06 AM
@tripleee BTW sed says that -i for editing in place accepts "files" so I'm guessing that it will expand wild-chars and do it's thing on all the files that match .... is that right ?
 
@louigi600 the shell handles any wildcards before sed even sees the list of arguments
 
ok and sed will do it's thing on all the files that the shell wild-char expanded
like
sed -i "s/hello/bello/g" *.txt
is going to do the substitution on all the txt files
in the current folder
 
yeah, the shell expands that to sed -i "s/hello/bello/g" a.txt b.txt etc.txt and then sed processes each of those files
 
;)
 
a good precaution is to add ./ in front of any wildcard in case it expands to something which looks like an option
 
10:10 AM
yep ... I often do that too when I delete files
 
notice that sed -i is not portable; and on *BSDish platforms (including macOS etc) you need to specify an argument like sed -i '' "s/foo/bar" files
 
fetching your deleated files on unix systems is not something I like doing ... consumes an enormous amount of time and you better remember the right names anyway supposing you've done all the rest right
sed should work more or less the same on all unix'ish systems
 
 
11 hours later…
 
2 hours later…
11:06 PM
is the command to print stderr right after a command echo $2 or echo $&2 or something else?
 

« first day (552 days earlier)      last day (2497 days later) »