If you want to check the passed argument is a directory or not by using
No, the goal is to check if the contents (of the argument directory) are directories or not. I got it working with this code below, but what I don't understand is why the for/if notation I used in the top (no argument version) had to be changed so much for the bottom (argument version). I guess I'm not sure exactly what "i in *" (in the top version) is iterating over. How does it define *?
Hi all!
I'm a newbie to shell scripting.
I want to create a script that will store a line from a text file in a variable so I can then use it to open firefox with that text in the address bar (the text file contains a list of addresses).
I have tried the following:
#!/bin/sh
a='sed -n 2p... (2 Replies)
Hello Gurus,
Here's my problem, I have log files that are created automatically once a day by a feature of NetBackup called Vault. I usually move these files manually to a different location so I can FTP them later, however I know that this can be automated and so here's the info:
When vault... (2 Replies)
I'm relatively new at this scripting game, just need to learn some basic stuff for data handling.
My current need is to write a script that loops through a textfile of filenames, and for each file removes the first line and re-writes that file to a new name.
In fact I could do with knowing... (1 Reply)
Hey, I'm running knoppix and I'm trying to run a shell script to change multiple lines of text in multiple files
#!/bin/sh
for i in 'ls-1 test'
do
sed 's/bob/manny/'g $i > $i.0
mv $i.0 $i
done
Obviously this isn't the original file, but it's on another non-networked machine.
What... (7 Replies)
Could someone please recommend a very good shell scripting book for me. I would be starting a new job that would require a very good understanding of shell scripting. Please help. (3 Replies)
my default profile is using ksh, I tried to write a simple scripts and I had issues, below is my scripts:
$ more if_num.ksh
USAGE="usage: if_num.ksh"
print -n "Enter two numbers: "
read x y
if ((x=y))
then
print "You entered the same number twice."
when I tried to executed the... (6 Replies)
Hi guys, I am a newbie to shell scripting.Please help me to accomplish this task. Its very urgent,I should create a script which will do the following:
i) "cd ~joseph/ ; mkdir -p Bing/Bong ;mkdir -p Bing/Bang" and then create 15 ".txt" files with content "Bing Bang Bong" in "Bong"... (1 Reply)
I know php is a Web Development language but what does it have to do with shell scripting. I might be wrong about php. Is there a CLI? How do I make one and how does it work? Please don't answer these if you have any books on this. Please give names of good beginner books for php shell scripting... (3 Replies)
Hi Guys, I want to create a shell script to run multiple jobs in sequence.
Explaination -
If I were to run each jobs individually I would have gone to folder - "abin"(where my shellscript is place) as follows
cd abin
abin > runappeng.sh abc001
Now, I have list of programs which are like... (8 Replies)
Hello. I hava homework for university but i cant do it and i need a little help if someone can help me :) I have to do a linux shell script.
Write a script that does the following:
1. Check if there is a directory in / home with myDir name.
If not, it creates it.
2. In the directory it... (1 Reply)
Discussion started by: alex4o0o
1 Replies
LEARN ABOUT DEBIAN
ocs
ocs(1) General Commands Manual ocs(1)NAME
ocs - creates and maintains the database for cscope on a recursive directory set
SYNOPSIS
ocs [-x] [-f] [-q] [-u]
DESCRIPTION
This manual page briefly documents ocs , a shell script wrapper that automates the creation and maintenance of a cscope(1) database on a
recursive set of directories. Under normal circumstances, ocs generates a cscope database on a recursive group of directories starting from
the current working directory, before launching cscope(1) in interactive mode.
OPTIONS -x Enable debugging.
-f Force. Do not ask about regenerating 'TMP' lists (lists generated by ocs ), just do it; Allow the regeneration of 'CSD' (lists gen-
erated by cscope(1) ) lists.
-q Tell cscope to build a fast reverse index. Database disk space usage is doubled, but searching speed is increased.
-u Request that the database be updated or regenerated.
FILES
./cscope.rc
If this is an executable shell script, it will be included in the body of ocs in order to override intenal filenames and other
options. See the comments at the top of /usr/bin/ocs for more information.
BUGS
None noted.
SEE ALSO cscope(1), /usr/bin/ocs.
AUTHORS
This manpage originally prepared by Nick Rusnov <nick@grawk.net> for the Debian Project.
The Debian Project June 2001 ocs(1)