About 50 results
Open links in new tab
  1. How to cat <<EOF >> a file containing code? - Stack Overflow

    1 cat with <<EOF>> will create or append the content to the existing file, won't overwrite. whereas cat with <<EOF> will create or overwrite the content.

  2. python - `stack ()` vs `cat ()` in PyTorch - Stack Overflow

    Apr 1, 2022 · One is using torch.cat, the other uses torch.stack, for similar use cases. As far as my understanding goes, the doc doesn't give any clear distinction between them. I would be happy to …

  3. 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:

  4. Linux command (like cat) to read a specified quantity of characters

    Is there a command like cat in linux which can return a specified quantity of characters from a file? e.g., I have a text file like: Hello world this is the second line this is the third line And I

  5. What is the difference between cat and print? - Stack Overflow

    cat is valid only for atomic types (logical, integer, real, complex, character) and names. It means you cannot call cat on a non-empty list or any type of object. In practice it simply converts arguments to …

  6. cat - How to display contents of all files under a directory on the ...

    Jan 22, 2014 · cat file1 file2 file3 But in a directory if there are more than 20 files and I want content of all those files to be displayed on the screen without using the cat command as above by mentioning the …

  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. Bash: redirect `cat` to file without newline - Stack Overflow

    How do I prevent or remove the newline when file1 is added to newFile? If I cat file1 there seems to be a newline added by cat but everything I see about cat says it doesn't do that. If I vim file1 there's not a …

  9. unix - How to pipe list of files returned by find command to cat to ...

    May 14, 2009 · There are a few ways to pass the list of files returned by the find command to the cat command, though technically not all use piping, and none actually pipe directly to cat.

  10. Can linux cat command be used for writing text to file?

    0 Since nobody else answered the original question. Yes. cat can be used to write text to a file without a here doc.