10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have the below script that checks if the .tar file exists in my present directory. If so, extract it and then delete it except if the .tar filename is blent.tar
#!/bin/bash
while ; do
echo "TAR BALL EXISTS"
for f in *.tar; do
echo "File -> $f"
tar -xvf $f
rm -ir $f... (7 Replies)
Discussion started by: mohtashims
7 Replies
2. Shell Programming and Scripting
Hi all,
i have a logfile which is continuously being updated. I have built a script to check for a specific content and if it is found, it sends a string into a file. Here's the current script:
#!/bin/bash
logfile=/opt/jboss-eap-6.3/standalone/log/server.log
tail -fn0 $logfile | \... (7 Replies)
Discussion started by: nms
7 Replies
3. Shell Programming and Scripting
Hi gang, I have the following code inside a the file script.sh
#!/bin/bash
todaysdate=$(date --date='7 day' +'%d')
todaysmonth=$(date +'%m')
todaysyear=$(date +'%Y')
yahoodatestring=$todaysyear$todaysmonth$todaysdate
nicedate=$(date --date='5 day' +'%A')
nice="$nicedate,... (2 Replies)
Discussion started by: phpchick
2 Replies
4. Shell Programming and Scripting
Hi,
I have a file with few values in it. I need script help to read file line by line and check:
1/if it's a file (with extension eg .java .css .jar etc )
or
2/if it's a file without extension and treat it as a directory and then check if the directory exists in working copy else create one... (6 Replies)
Discussion started by: iaav
6 Replies
5. Shell Programming and Scripting
I am in the process of developing a perl cgi page.
I had succeeded in developing the page but there are few errors/issues with the page.
description about cgi page:
My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies
6. Shell Programming and Scripting
Hi All,
I m very new to unix...i jus want to chk the content of file.
ma requirement is
if file has a content then
display it
else
dont display or something
pls specify which loop shalli use either for or while?? (20 Replies)
Discussion started by: navsan
20 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Below is some code that I would like to implement however I am getting these errors: (what I am attempting to do is to check if a zip file has ascii files and if ascii and not binary then move the ascii files to a folder. some of the files are in xml format but are ascii and i will be moving... (0 Replies)
Discussion started by: bwcberb
0 Replies
8. Shell Programming and Scripting
I have a directory structure with multiple sub directories. Within each directory, there are files without extensions. Is it possible to somehow tell what the file type should be by the file contents?
For example, I opened one of the files using an editor. After scrolling to the end of the... (2 Replies)
Discussion started by: daflore
2 Replies
9. Shell Programming and Scripting
Hi ,
I have a file called "X" . the content of X are
X
--
abc
def
and i have a file called "Y" , the content of Y are
Y
--
erty
sdss
s
abc
sfs
def
I need to check if the content of file X is contained in Y.Only unix (7 Replies)
Discussion started by: giri_luck
7 Replies
10. Shell Programming and Scripting
hi
i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format,
please help
thanks in advance
satya (1 Reply)
Discussion started by: Satyak
1 Replies