Question: I made this batch file: #!/bin/sh #Move to the directory cd $HOME/data/yesh/due/File #Make the files needed cat > file1/file1.txt cat > file2/file2.txt cat > file3/file3.txt
I made this batch file:
#!/bin/sh #Move to the directory cd $HOME/data/yesh/due/File #Make the files needed cat > file1/file1.txt
cat > file2/file2.txt
cat > file3/file3.txt
cat > file4/file4.txt
cat > file5/file5.txt
cat > file6/file6.txt
cat > file7/file7.txt
But I need to actually add sentences inside each of the files that the cat command makes. How do I add text to these files in a script? and how do I bypass the (Ctrl + D) to close and save for each file? This prevents all files after the first one from being made.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
