echo command and file I/O Redirection


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting echo command and file I/O Redirection
# 8  
Old 05-11-2008
userix,

with sticky bit I meant it on the directory - hope you also meant the same.

When the data can't fit in the pipe kernel data structure automatically it retorts to storage in the form of file.

Is it something, user should be able to create only process space and no files at all ?

Even with what I had suggested its going to be a silent operation, temp file creation and deletion.
# 9  
Old 05-11-2008
Quote:
Originally Posted by matrixmadhan
userix,

with sticky bit I meant it on the directory - hope you also meant the same.

When the data can't fit in the pipe kernel data structure automatically it retorts to storage in the form of file.

Is it something, user should be able to create only process space and no files at all ?

Even with what I had suggested its going to be a silent operation, temp file creation and deletion.
I grabbed the definition of sticky bit from wikipedia: "when set, items inside the directory can be renamed or deleted only by the item's owner, the directory's owner, or the superuser"

So would this mean that when my professors runs the script, it will create the temp file with no issues, but when it comes to "rm" the temp file, he won't be able to, since sticky bit forbids deleting of any files in the set directory, thus throwing an error when it hits the "rm tempfile" part of my script? I guess in the end, I can just give him write permissions as well to the folder containing this script, that way the temp file will create and delete without errors. Thanks again.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command output redirection to file issues

Hi, I have a peculiar issue w.r.t redirecting the command output to a file when using loop. I am redirecting command output to same file in a series of if condition statements, but if one block of if condition statement writes the log to the file , the subsequent block of if condition... (7 Replies)
Discussion started by: ananan
7 Replies

2. UNIX for Dummies Questions & Answers

Redirection of file input to command

Hello, I'm new to Unix (working with OS X 10.8.5) and therefore at the beginning of my adventure. If I ask something stupid, then this is not intentional, but simple nescience. :rolleyes: I have a problem with the redirection of text file content to echo. I was experimenting with redirection... (6 Replies)
Discussion started by: pseudo
6 Replies

3. UNIX and Linux Applications

output redirection command

Dear All, ./waf --run scratch/myfirst > log.out 2>&1 The above is a command line to redirect the output to a file called log.out. what is the 2>&1 part for ? Thank you (2 Replies)
Discussion started by: knowledgeSeeker
2 Replies

4. UNIX for Dummies Questions & Answers

echo and redirection

I am trying to write a simple script which prints some output, but also saves the same in a logfile. echo hello echo hello >> logfile Is there anyway i Can write single sentence of code and get the same result: ( i am using CSH ) (4 Replies)
Discussion started by: animesharma
4 Replies

5. Shell Programming and Scripting

Display and write in file in one echo command

Hi All, I want to display content on command promt and also write in file. For that iI ahve to write two sentence echo "XXXXXXX" echo "XXXXXXXX" >> 1.txt Is there any way to write in one echo statement (1 Reply)
Discussion started by: vivek1489
1 Replies

6. Shell Programming and Scripting

Help with tar --append command output redirection

I am using tar command to append daily database backups on tape. "tar --append " command help me to do this. But tar --append command does not produce any output on stdout if it succeed. I want the output for that appended command to a log file. This log file should contain only the name of the... (0 Replies)
Discussion started by: pganguly46
0 Replies

7. Shell Programming and Scripting

redirection if command help please

#!/bin/bash clear echo "Hello $USER" echo "Do you wish to run this network configuration script ?" read option if($option == 'Y' || 'y' ) then echo " auto eth0 iface eth0 inet static address 192.168.1.161 ... (5 Replies)
Discussion started by: wezzyb
5 Replies

8. Shell Programming and Scripting

problem with suppressed output to file using echo and tee command

Hi, When I run the following command in terminal it works. The string TEST is appended to a file silently. echo TEST | tee -a file.txt &>/dev/null However, when I paste this same line to a file, say shell1.sh, and use bourne shell . I run this file in terminal, ./shell1.sh. However I... (1 Reply)
Discussion started by: shahanali
1 Replies

9. Shell Programming and Scripting

nohup command o/p redirection

Hi I am using nohup command in script(say nohup ls- ltr > somefile 2>&1 & ). I dont want any kind of output to be displayed on screen. When i tried the above nohup it still gives me some out put on screen like 2991 Done >somefile 2>&1 Please you let me know what is... (3 Replies)
Discussion started by: ammu
3 Replies

10. Filesystems, Disks and Memory

Unix command redirection

Hi all,, Is there any way to redirect the command o/p directaly to a memory location instead of redirecting it to the file?? (1 Reply)
Discussion started by: swap007
1 Replies
Login or Register to Ask a Question