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. Shell Programming and Scripting
Hi. I m trying to figure out how to do this.
I have a directory full of files (100 files) and I want to be able to search for a string called "end" at the end of the files (last line or last 5 lines) and echo each file to say "incomplete" if not found.
This is what I have so far.
---... (4 Replies)
Discussion started by: jasonhawaii
4 Replies
3. Shell Programming and Scripting
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Is there a way to suppress this message?
Null message body; hope that's ok
My email string is:
mailx -s "This is my subject" myemail@domain.com < /dev/null
It's just an annoyance to me that I would like see go away. (3 Replies)
Discussion started by: bbbngowc
3 Replies
5. UNIX for Dummies Questions & Answers
OS - AIX 6.1
I am have below entry in my .profile
DS_LIB=/opt/IBM/InformationServer/Server/DSEngine/bin
export DS_BIN
When I do echo $DS_BIN, echo is returning empty
$ echo $DS_BIN
$
I never had this kind of issue earlier, please help me.
Thanks
srimitta (4 Replies)
Discussion started by: srimitta
4 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. Shell Programming and Scripting
Im trying to execute application and its return code is below
IF Status code=o
echo "........"
else Staus Code =-2 DJRE
then echo "......"
Can any one help me how to handle the status code and echo some message. (12 Replies)
Discussion started by: laknar
12 Replies
9. UNIX for Dummies Questions & Answers
I want to print "empty" if $TEST is empty.
TEST=
if ${TEST:?} ; then echo empty; fi
But it doesn't work. What's wrong? (2 Replies)
Discussion started by: meili100
2 Replies
10. Shell Programming and Scripting
Hi,
I would like to write a shell script that moves files from one folder to another without retrieving the error 'can not acces/find file or folder' when the source folder is empty.
Any ideas,
Thx in advance,
Steven. (2 Replies)
Discussion started by: Steven
2 Replies