10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. UNIX for Dummies Questions & Answers
original post --
I have a korn shell script that does some things that depend on creating and writing a file in a directory. I'm looking for a more elegant/efficient way to do the check than what I'm using now:
if ]
then
print "Creating ${STGDIR}/${SHOW}"
mkdir... (3 Replies)
Discussion started by: Dalej
3 Replies
3. Shell Programming and Scripting
I am trying to test the output of a file. What I have so far is this:
if ]; then echo "yes";fi
The problem with this is it works but I only want it to print out if the file contains the word "Compacted." The == sign means identical or equal to so it won't work. I tried ~ but that doesn't... (4 Replies)
Discussion started by: newbie2010
4 Replies
4. Shell Programming and Scripting
script name: filetest.sh
if ; then
echo " You didn't enter any argument"
elif ; then
echo " file not exist"
elif ; then
echo " file not readable"
elif ; then
echo " file not writable"
else
echo " file both readable and writable"
fi
running like...
$ ./filetest filename
... (3 Replies)
Discussion started by: ani83_pune
3 Replies
5. Shell Programming and Scripting
i have written this simple script called isdir.sh
#! /bin/bash
dir=$1
_ls=`ls $dir`
for file in $_ls
do
if
then
echo "D $file"
fi
donethe output is not right.
for example
$ ./isdir.sh src
***no output***
but i have in ~/src some directories
drwxr-xr-x 2... (5 Replies)
Discussion started by: and77
5 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
Discussion started by: mavesum
4 Replies
7. UNIX for Dummies Questions & Answers
AIX 5.3 / KSH
I have a Java application which creates a log file a.log. I have a KSH script which does the following action
cp a.log /directory2/b.log
> a.log
After this the file size goes to 0 as per "ls -l"
Then next time when the application writes into this file, the file size... (4 Replies)
Discussion started by: firdousamir
4 Replies
8. UNIX for Advanced & Expert Users
Hi,
I need your help.
How can I create an empty filename with a specific size, in hp-ux?
Regards,
Mizi (2 Replies)
Discussion started by: Mizi
2 Replies
9. UNIX for Dummies Questions & Answers
hey guys
How can i test existence of a file /directory in a directory in a script
thanks (2 Replies)
Discussion started by: ajaya
2 Replies
10. UNIX for Dummies Questions & Answers
Has anyone got a few tips on how I can test if the file size is 0?
I am moving files on a regular basis from one location to another with ftp. The files which are 0 bytes in size we want to discard.
Thankyou in advance. (3 Replies)
Discussion started by: Ivo
3 Replies