Open links in new tab
  1. linux - How does "cat << EOF" work in bash? - Stack Overflow

    The cat <<EOF syntax is very useful when working with multi-line text in Bash, eg. when assigning multi-line string to a shell variable, file or a pipe. Examples of cat <<EOF syntax usage in Bash:

  2. How do I recursively grep all directories and subdirectories?

    Feb 16, 2016 · If you find yourself frequently using grep to do recursive searches (especially if you manually do a lot of file/directory exlusions), you may find ack (a very programmer-friendly grep …

  3. How to get .pem file from .key and .crt files? - Stack Overflow

    Oct 11, 2017 · cat server.crt server.key > server.includesprivatekey.pem I would recommend naming files with "includesprivatekey" to help you manage the permissions you keep with this file.

  4. "No such file or directory" but it exists - Stack Overflow

    Oct 16, 2010 · I think that something was wrong with the file. what I've done: open a ssh session to the server cat filename copy the output to the clipboard rm filename touch filename vi filename i for insert …

  5. How to obtain the number of CPUs/cores in Linux from the command …

    Jun 26, 2011 · I have this script, but I do not know how to get the last element in the printout: cat /proc/cpuinfo | awk '/^processor/{print $3}' The last element should be the number of CPUs, minus 1.

  6. Decoding facebook's blob video url - Stack Overflow

    This method will get the video and its audio AS SEPARATE FILES. The downloaded video will have no sound, but you will be able to download its audio file and connect it to the video in some video editing …

  7. linux - Retrieve last 100 lines logs - Stack Overflow

    Aug 6, 2018 · I need to retrieve last 100 lines of logs from the log file. I tried the sed command sed -n -e '100,$p' logfilename Please let me know how can I change this command ...

  8. INSERT statement conflicted with the FOREIGN KEY constraint - SQL ...

    Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Sup_Item_Sup_Item_Cat". The conflict occurred in database "dev_bo", table ...

  9. How to append output to the end of a text file - Stack Overflow

    Oct 23, 2018 · Use command >> file_to_append_to to append to a file. For example echo "Hello" >> testFile.txt CAUTION: if you only use a single > you will overwrite the contents of the file. To ensure …

  10. How can I access the value of a promise? - Stack Overflow

    promiseB = promiseA.then(function(result) { return result + 1; }); // promiseB will be resolved immediately after promiseA is resolved and its value // will be the result of promiseA incremented by 1 I'm not …