Sponsored Content
Top Forums Shell Programming and Scripting Seeking assistance in Shell script Post 302888020 by vinil on Wednesday 12th of February 2014 10:06:57 AM
Old 02-12-2014
Quote:
Originally Posted by anbu23
Code:
#!/bin/bash
>error_log
for s in `cat s.txt`
do
echo $(uptime $s) $s >>error_log
done

thanks it helped and worked Smilie.Please close this thread .
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

seeking help with shell script

I am trying to update a script which I had created to monitor tablespace usage. Originally the sql spooled out to a text file anything with more than 75% used. I have been asked to change this. Now the sql must spool out all tablespaces. The script I have to write should scan the file for... (4 Replies)
Discussion started by: Niadh
4 Replies

2. Shell Programming and Scripting

Need a little assistance with a shell script

I need to modify a script to send an attatched file. I have researched and read the faq's but have not found a solution for my script. Here is a copy of the code I am using: #!/bin/sh mysqldump --opt --skip-add-locks --user=****** --password=******* databasename | gzip >... (3 Replies)
Discussion started by: rickou812
3 Replies

3. Shell Programming and Scripting

shell script assistance please

When I run this command (showstatus <username> <dbname>) in the prompt, the following will be displayed in the screen: 1. Show processes 2. Start process 3. Stop process 4. Go back to prompt Once i choose/type Option "1" (which is Show processes), it will display the list of processes... (5 Replies)
Discussion started by: xinoo
5 Replies

4. Shell Programming and Scripting

Seeking for help in writing shell

Hi All, I got a problem and stuck to filter a log file, called it as "sample.log". This "sample.log" file is being generated by "script A". The "sample.log" look like below: :FORMATDATE_FORMATTIME:CmdArg->:SomeDoce:SomeFormatDocument: :FORMATDATE_FORMATTIME:imprtcp succeeded.... (1 Reply)
Discussion started by: anakiar
1 Replies

5. Shell Programming and Scripting

Shell Script Assistance

I am looking for a shell script or command to automate a process of opening many files in a directory and changing a string of text. Example: I have a apache web server that uses virtual hosting. There are approximately 2300 vhost entries or files. So in the directory... (2 Replies)
Discussion started by: jaysunn
2 Replies

6. Shell Programming and Scripting

Need assistance with simple shell script to organize files. [Code attached]

I need some help with this shell script for class. All it does is organize your files. It works, but in the log file, it needs to show the new filepaths of the moved files. Heres my log of my output: Starting to organize... movie2.wmv --> movie3.mov --> movie1.mpg --> song1.mp3 --> ... (3 Replies)
Discussion started by: ryandamartini
3 Replies

7. UNIX for Dummies Questions & Answers

Assistance with shell script to check file type and move to a folder.

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. UNIX for Dummies Questions & Answers

need assistance on Calling DB user from separate file in Shell script

Hi All, I need to execute a SQL via shell script and i am connecting to Oracle DB by this way $USERNAME1/$PASSWORD1@$STRING1 and i need to get username, password and string from someother file stored in the Unix Directory. $Username, $Password and $String is stored in File A in Path A and i want... (1 Reply)
Discussion started by: sathish.tn
1 Replies

9. Shell Programming and Scripting

Shell script assistance Urgent

write a script using shift and case to receive 11 argument and do the following --arg1 - print hello message and the current proccess id --arg2 - read and edit a file based on the value which came along with the arg2. --arg3 - validate whether all... (1 Reply)
Discussion started by: saku
1 Replies
ludelete(1M)															      ludelete(1M)

NAME
ludelete - delete a boot environment SYNOPSIS
/usr/sbin/ludelete [-l error_log] [-o outfile] BE_name [-X] DESCRIPTION
The ludelete command is part of a suite of commands that make up the Live Upgrade feature of the Solaris operating environment. See live_upgrade(5) for a description of the Live Upgrade feature. The ludelete command deletes all records associated with a boot environment (BE) on all defined complete BEs. A complete BE is one that is not participating in an lucreate(1M), luupgrade(1M), or lucompare(1M) operation. Use lustatus(1M) to determine a BE's status. You can delete neither the current BE, nor the BE that will become current upon the next reboot. Also, you cannot delete a BE that has file systems mounted with lumount(1M) or mount(1M). ludelete does not alter any files on the BE being deleted. The ludelete command requires root privileges. OPTIONS
The ludelete command has the following options: -l error_log Error and status messages are sent to error_log, in addition to where they are sent in your current environment. -o outfile All command output is sent to outfile, in addition to where it is sent in your current environment. -X Enable XML output. Characteristics of XML are defined in DTD, in /usr/share/lib/xml/dtd/lu_cli.dtd.<num>, where <num> is the version number of the DTD file. OPERANDS
BE_name Name of the BE to be deleted. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/etc/lutab list of BEs on the system /usr/share/lib/xml/dtd/lu_cli.dtd.<num> Live Upgrade DTD (see -X option) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWluu | +-----------------------------+-----------------------------+ SEE ALSO
lu(1M), luactivate(1M), lucancel(1M), lucompare(1M), lucreate(1M), lucurr(1M), ludesc(1M), lufslist(1M), lumake(1M), lumount(1M), lure- name(1M), lustatus(1M), luupgrade(1M), lutab(4), attributes(5), live_upgrade(5) SunOS 5.10 24 Jan 2002 ludelete(1M)
All times are GMT -4. The time now is 03:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy