Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Saving terminal output to file line-by-line (writing and closing file after every print)

I have a Python script running on a Linux machine which is printing output out to the terminal. Currently, I'm logging this output to a file using the script command. However, the problem with this ...
ExtremistEnigma's user avatar
0 votes
1 answer
59 views

Having multiple computers on network access file?

Say I have a program being run on multiple computers all on the same network (and all on the same account). Every once in a while the program needs to read/write a file save.dat. The actual file ...
Graviton's user avatar
  • 103
-1 votes
1 answer
362 views

Read file and write output in another file using shell script

My input file is: Employee e_id e_name 100 abc 101 xyz 102 pqr Salary e_id e_salary 100 12345 101 67890 Dependents e_id depp1 depp2 100 qwer tyui 102 asdf ghjkl I want the output line by line as ...
Dev's user avatar
  • 1
6 votes
2 answers
3k views

Overwriting an input file

Solutions that I have come across for replacing the contents of an input file with converted output involve using a temp file or the sponge utility. Stephane Chazelas's answer here indicates another ...
iruvar's user avatar
  • 16.9k