Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I was wondering how to delete the first 196 lines of multiple html documents with sed.
The directory structure I have goes as follows:
find /rootdir/ -name index.html -exec sed -i '1,196d' {} \;
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I was asked this question in one of the interviews.
Can anyone please explain
ls -1 will list files each on separate line...
whereas ls itself will list them like so
ls -l shows all files or directories, with their respectives names, sizes, last date and hour of modification, and also all permitions for them.
while ls -1 will list files each on separate line
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
i.e.
List any files between 2014-01-25 1300 - 2014-01-25 2000 in
Cheers
You can use the find command with multiple selectors - e.g. find . -mtime +1 -mtime -3. It can be used with ctime, atime, etc., as well.
Assuming you have a GNU find (which you could compile on SunOS if you don't have it), use the age range options for find
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a file containing many lines like
"resourcename" : "myfile.pdf",
I want to replace everywhere myfile.pdf with an URL like http://somedomain.com/myfile.pdf. But the file name keeps changing. So if myfile.pdf becomes yourfile.pdf, I want to replace it with http://somedomain.com/yourfile.pdf.
What is an efficient way to do global replacement(/g) without affecting the file's encoding like UTF-8?
Thanks
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How do I reduce the size of a file using tail?
I just need the last 1000 lines of the file. I need the trimmed file name to remain the same.
tail -1000 file.txt
To make a new file
tail -1000 file.txt > newfile.txt
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need a shell script that should remove the matched pattern .
Can anyone please help me ?
The command is
sed -i -e '/yourpattern/d' your_file