06-20-2009
Do you know any scripting at all? Start looking at man pages and testing individual commands at the command line. Then put them together in a script. The script is basically just a collection of command line commands (though it can get more complicated and include conditional statements and such).
Start with `man date`. With the right options, you can get the date command to spit out the day of the week.
It's kind of dangerous to just take scripts from other people when you don't understand any of the details yourself (and, if it happens to be homework, it doesn't help you learn very well).
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi ALL:
I need to write a script that will start bunch of servers. and these servers each has a sudo account and they need a passowrd.
I dont know where to start and look.
Can you please give me some hints or some sample code.
Thanks in advance.
splax (4 Replies)
Discussion started by: splax
4 Replies
2. Shell Programming and Scripting
Ok, I am sure this has been beat like a dead horse, but I an trying "anew". I am trying to create a script that will automate a file transfer using sftp. Please, I am at rock bottom. Thank you. (2 Replies)
Discussion started by: klindel
2 Replies
3. Shell Programming and Scripting
echo "Enter your choice :\c"
read num
case $num in .
1)"${TEST_HOME}"/ctrl_extract.ksh 1 ;;
2)"${TEST_HOME}"/ctrl_extract.ksh 2 ;;3)"${TEST_HOME}"/ctrl_extract.ksh 3 ;;
4)"${TEST_HOME}"/ctrl_extract.ksh 4 ;;
5)"${TEST_HOME}"/ctrl_extract.ksh 5 ;;... (3 Replies)
Discussion started by: arghya_owen
3 Replies
4. Shell Programming and Scripting
Hi All,
I am writing an automated SFTP script to xfer files. I am able to do sftp in batch mode and it is working absolutely fine.
The problem is that on redirecting the output of SFTP session to some file, it is not writing about the status of SFTP operation. All i can see in output file is :... (6 Replies)
Discussion started by: aggar_y
6 Replies
5. UNIX for Advanced & Expert Users
Hi Unix gurus,
I am trying to create a script to automate the copying of files daily from one server to another using the scp command.
-->
#!/bin/ksh
KEY="$HOME/.ssh/SSHKEY"
if ;then
echo "Private key not found at $KEY" >> $LOGFILE
echo "* Please create it with \"ssh-keygen -t dsa\" *"... (5 Replies)
Discussion started by: gholdbhurg
5 Replies
6. Shell Programming and Scripting
Hi guys,
I'm new to Linux and dont know much of scripting..there's an automated backup script that will backup the database from a location to another location between servers..it was created by another person and I tried to understand it somewhat..
I hope the script first checks if mount... (4 Replies)
Discussion started by: koolhart
4 Replies
7. Shell Programming and Scripting
Hello, how can I write a shell script that looks in running processes and if there isn't a process name containing 91.34.124.35 then execute a file in a certain place.
I know PHP, in PHP I could do a preg_match_all but I don't know how to do it in shell. (5 Replies)
Discussion started by: nottingham
5 Replies
8. UNIX for Dummies Questions & Answers
if i have a script called test.sh
file1=$(ls -l|awk '{print $9 $1}')
awk ' /date_of_selling:/ { print $6 ":" &9 }' /$file1 >> data.txt
if i wanna this script to run automatically every day at 8 am :D (3 Replies)
Discussion started by: teefa
3 Replies
9. Shell Programming and Scripting
HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here
Im explaining the requirement of script.
AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies
10. Shell Programming and Scripting
Hi,
I need a script to execute below task. As of now I am doing it manually and want it automated.
1)go to below path
cd /path/of/file
check for the availibility of two file as below of the latest date.
test.week1.data
test.week2.data
Case1. If above files are not present... (3 Replies)
Discussion started by: sv0081493
3 Replies
LLDB(1) BSD General Commands Manual LLDB(1)
NAME
lldb -- The debugger
SYNOPSIS
lldb [-hvdexw] [-a arch] [-l script-language] [-s lldb-commands] [-n process-name] [-p pid] [[--] <PROGRAM-ARG1> <PROGRAM-ARG2> ...]
DESCRIPTION
lldb is the command line interface for the LLDB debugger library. lldb can debug C, C++, Objective-C, and Objective-C++ programs.
The following options are available:
-h, --help
Prints out the usage information for the lldb debugger. The --help text may be more up-to-date and authoritative than the command
line options described in this man page.
-v, --version
Prints out the version number of the lldb debugger.
-a, --arch arch
Specifies which architecture lldb will use when launching the specified program (assuming the provided executable is built for multi-
ple architectures.)
-f, --file filename
Specifies the executable file that will be launching / attaching to.
-n, --attach-name process-name
Specifies the name of a currently-running process to attach to. (or the name of a process to wait for if -w is used.)
-w, --wait-for
When used in concert with -n process-name-E, indicates that lldb should wait for a new process of that name to be started -- and
attach to it as early in the process-launch as possible.
-p, --attach-pid pid
Specifies a currently running process that lldb should attach to.
-l, --script-language language
Tells the debugger to use the specified scripting language for user-defined scripts, rather than the default. Valid scripting lan-
guages that can be specified include Python, Perl, Ruby and Tcl. Currently only the Python extensions have been implemented.
-d, --debug
Tells the debugger to print out extra information for debugging itself.
-s, --source filename
Tells lldb to read in and execute the file "filename", which should contain lldb commands.
-e, --editor
Instructs lldb to open source files using the host's "external editor" mechanism.
-x, --no-lldbinit
Do not automatically parse any '.lldbinit' files.
(If you don't provide -f then the first argument will be the file to be debugged so 'lldb -- <filename> [<ARG1> [<ARG2>]]' also
works. Remember to end the options with "--" if any of your arguments have a "-" in them.)
USING LLDB
In lldb there is a help command which can be used to find descriptions and examples of all lldb commands. To get help on "breakpoint set"
you would type "help breakpoint set".
There is also an apropos command which will search the help text of all commands for a given term -- this is useful for locating a command by
topic. For instance, "apropos breakpoint" will list any command that has the word breakpoint in its help text.
FILES
lldb will read settings/aliases/commands from three files at startup, if they exist.
First, it will read a ~/.lldbinit-debugger command file. If you are using the lldb command line interface, this is ~/.lldbinit-lldb. If you
are using lldb inside a GUI debugger like Xcode this will be ~/.lldbinit-Xcode. This is a useful place to put settings that you want to
apply only when a given lldb command interpreter is used.
Second, ~/.lldbinit is read.
Third, an .lldbinit file in the current working directory (where lldb is started) will be read.
SEE ALSO
The LLDB project page http://lldb.llvm.org/ has many different resources for lldb users -- the gdb/lldb command equivalence page
http://lldb.llvm.org/lldb-gdb.html can be especially helpful for users coming from gdb.
BUGS
To report bugs, please visit http://llvm.org/bugs/
AUTHOR
Maintained by the LLDB Team, http://lldb.llvm.org/
Darwin 7 June, 2012 Darwin