Hi all, why does one version of this command work but not the other?
- This file already exists [/users/d269836/scripts.txt] with 644 mod permissions
- I am logged in as d269836, no su rights.
- Box is 'SunOS' running bash I think; but runs ksh scripts OK.
This one works:
...and yet these code examples append nothing to scripts.txt:
Note that all commands produce the expected output (on stdout) when not redirected to scripts.txt. Hence the weirdness? UPDATE: Also, these commands work fine if not appended to scripts.txt (just redirected) like so:
Am I losing my mind here?? This is starting to smell implementation-dependent...
Here is the original code I'm trying to make work - but it fails accordingly to above pattern.
Last edited by dan-e; 10-15-2008 at 11:46 PM..
Reason: New information added
...well it now outputs the full path of every file it tests, rather than the ones I'm filtering for...
Have I just found a bug in the illustrious 'NIX? Can anyone reproduce (or not) what I have described in the original post? Is this a common variety of glitch in ux?
...well it now outputs the full path of every file it tests, rather than the ones I'm filtering for...
Have I just found a bug in the illustrious 'NIX? Can anyone reproduce (or not) what I have described in the original post? Is this a common variety of glitch in ux?
Im scared!! and I need answers!!!
Unless I'm missing something here (that happens rather often unfortunately ), your command doesn't actually instruct find to display the output but instead relies on a bit of smarts find has that prints what it matches if stdout is not redirected... I'd not have expected the first one (that does work) to work correctly either
As suggested by zaxxon, add a -print or -ls to actually output the name on stdout.
If it's showing every file, I would guess you have the -print before the rest of the tests (it does them in order, -print and -ls always return true).
OK! Good advice guys... but the mystery is still unsolved.
Adding -print to the end of the command did fix the issue with all file names being output (cheers zaxxon), like so:
... now I get only the files I care about, but it still won't append the output to file! It will redirect to the file, but not append.
Any clues to that end? Is it possible to disable append-redirection?
Here's a handy take-home pack of the BS I am experiencing:
Last edited by dan-e; 10-17-2008 at 12:35 AM..
Reason: Code sample added
Logged in as root, worked from /tmp and repeated commands - all fine.
The underlying cause?
Disk space quota busted under my login d269836. Apparently my quota was ~5kb.
Which is annoying. But not as annoying as multiple commands failing & negating to mention why, or so much as notify ANY failure.
Aaaaanyway, cat saved me! And these forums! here's how:
If anyone has an explanation for my NFI section in the code above, I'm dying to be humoured! Thanks all for your assistance...
I have this line were I am selecting some fields from one file and creating a new file for the selected data.
awk -F "\"*,\"*" '{print $1"," $2}' folderone/list.txt > folderone/qlist.txt
This works, but then from this new file I want it to create a new file where it separates data:
$2 >5 it... (2 Replies)
For example,
if we run the below command,
symcfg list -thin -pool , results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it doesnt result any output and even though the output is being redirected, i can see "No Thin Pools "... (2 Replies)
I am trying to filter records based on number of "|", delimiter in my application. If number of "|" is greater than 14 its a bad record, else its a good record. I have to redirect output to two different files based on the if-then-else evaluation in AWK.
if number of “|” in file_0 > 14
... (2 Replies)
Hi Friends,
Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Hello,
I am interested in taking the output from a script i wrote and using it as input to a different script i wrote. So for example i want to take the output from program2 and use it as a parameter for program1. I didnt think i could use the >> symbols because i think that is just for .txt... (4 Replies)
Hi,
Below is the whole string which is to be redirected to the new file.
su - oracle -c "exp $user/$pass file=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.dmp log=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.log tables=table1,table2 statistics=none"
... (3 Replies)
Hello...I'm having problems redirecting output from a script from a mailbot. It is a perl script that has the email sent to op_shipper piped into it.
I am receiving the email with sendmail and here is what my alias looks like for the script am I having problems with in /etc/aliases:
... (3 Replies)
Hi,
I want to move the output of a command/script to a file as well as to to be displayed on stdout.
Can anybody help me in this. Thanks in advace ..
-Chanakya M (1 Reply)
Hi,
I have 2 identical servers both running aspell but for some reason I can't redirect the output to a file on one of them. This is what I'm trying to do:
echo feck | aspell -l > errors.txt
On one machine this works fine but the other it doesn't (the file is created but it is empty). ... (6 Replies)
Is there any way to redirect the output of the startup of a sun E250. Im basically trying to troubleshoot some init scripts and it would be useful to have a log of the startup output. (3 Replies)