I have tried this shell script on a SUSE 10 server, kernel 2.6.16.60, ext3 filesystem.
The script has a line like this:
cat file | awk '{print $1" "$2" "$3}' | sort -n > result
The file's size is about 3.2G, and I get the following error message: File size limit exceeded.
In this shell, ulimit -f is unlimited.
After I change script into this:
cat file | awk '{print $1" "$2" "$3}' >tmp
I have tried this shell script on a SUSE 10 server, kernel 2.6.16.60, ext3 filesystem
the script has problem like this:
cat file | awk '{print $1" "$2" "$3}' | sort -n > result
the file's size is about 3.2G, and I get such error message:
File size limit exceeded
in this shell, ulimit -f is unlimited
after I change script into this
cat file | awk '{print $1" "$2" "$3}' >tmp
sort -n tmp
hi,i am using ubuntu and generally use VI editor to write shell scripts. i am required to write a shell script to copy the text of one file(a text file) into another file.While the script executes, the shell shall ask the user to input the source filename and destination filename (both these files have been initially created by using "cat" command in the terminal).
I'm finding that a call to the mail command is causing a script to suspend without error. To close the script I have to ctrl-c or issue a kill command on the process id.
Hello Guys,
I want to write a shell script which monitors SystemOut.log file which goes on update.
This script must check the log file continuously and if any error with ORA- appears it must send the error and next 10 lines to an email, and if any new ORA- error comes again it must do the same.
Any one can help me?
TIA
I am using CentOS 5.5. There is a CSV file in a particular directory(/somewhere/somefile.csv) where a software continuously appending comma separated row(s) of data time to time and the file size is growing big (currently it's 50MB+).
My idea is to create a demon to watch the CSV file.
Hi,
I am new to shell scripting in unix HP-UX.
I need to determine how much a perticular file system is full and if it goes over 80% it should notify through mail about which are the files which are greater than 1 GB size.
I used df -k command it is showing the alloocated KB and the %used in that FS. But how to get it through script and find the files > 1 GB.
Can anybody advise?
Hello please kindly solve these doubts i have about the following scripts
Code:
Script 1
//Shell script that accepts arguments and prints them in reverse order//
echo "number of arguments"
len=$#;
while [ $len -ne 0 ]
do
eval echo \$$len
len=`expr $len - 1`
done
---------
Output
$sh test.sh a b
b
a
1.what is \$$len.what is the significance of the escape sequence
Script 2
Cod
i create a file using dd command like this:
dd if=/dev/zero of=1g.dd bs=1M count=512 seek=512
when i run command ls 1g.dd, its size is 1G, run du 1g.dd, it's 512M.
there is a struct stat in c library to read file size, but it can only read out that 1G size, now how can i get that 512M size which is the real size of that file?
now the only way i know is to parse shell command du's output.