Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Executing several commands in a text file Post 302963457 by otheus on Wednesday 30th of December 2015 09:09:12 PM
Old 12-30-2015
Simple:

Code:
sh scriptname

Now, you have some interesting options. You can log all the output and error to a file:

Code:
sh scriptname &> all-output.log

An important option is '-x' which will log each command as it is executed.

Code:
sh -x scriptname &> all-output.log

Another interesting option is "-e" which will abort on an error.

Code:
sh -e scriptname &> all-output.log

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Executing commands with xargs

I have a SQL script that requires values from the environment in order to execute. I found a way to get the desired results but my process is a little choppy. Any suggestions on how to clean this up would be greatly appreciated. SQL Script ------------- select a, b, c from d where a =... (1 Reply)
Discussion started by: bmopal
1 Replies

2. Red Hat

How commands are executing ?

Hi Folks, I have a small doubt, the binary commands under /bin and /sbin as well as other path binary files, if you peek deep into that, you can find the difference in the way of normal perl programming and some commands will be like binary files. how are the commands executing like the... (3 Replies)
Discussion started by: gsiva
3 Replies

3. Shell Programming and Scripting

Executing many commands at once

Hi, I want to run these two commands one after the other. awk 'BEGIN {OFS="\t"} {print $2}' sort -u rather than typing awk 'BEGIN {OFS="\t"} {print $2}' file1 > file2, then sort -u file2 > file3. Is it possible to run both commands on file1 then get output file3? Its kinda hard for... (5 Replies)
Discussion started by: kylle345
5 Replies

4. Shell Programming and Scripting

Executing commands

I need to execute a command to run my script several times with varying parameters perl ex.pl -b 130198 -e 130884 -c plot plot.txt 1_plot.txt perl ex.pl -b 1345 -e 1308 -c plot plot.txt 2_plot.txt perl ex.pl -b 1345567 -e 130898 -c plot plot.txt 3_plot.txt . . . 100's of excutions ... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

5. Shell Programming and Scripting

Commands to reorganize a text file

Hi! I am trying to create a script to reorder the contents of a text file. Below is the text file initially, followed by how I would like it reordered: File initially: --- Initial lines with text and/or numbers Initial lines with text and/or numbers Initial lines with text and/or numbers... (11 Replies)
Discussion started by: gwr
11 Replies

6. Shell Programming and Scripting

executing commands from a file after filtering

Hi, I have a question here. Please suggest. I have a file which has some unix commands to be executed through shell scripting. The number of commands will be different every time based on some external instructions i received. I manually keep the instuctions in this file. i need to execute... (1 Reply)
Discussion started by: rbalaj16
1 Replies

7. Shell Programming and Scripting

Calling a text file while executing a script

hi, I am trying to call a text file in a shell script. The text file has the variable defind like.. export vari_namee=/path/give/here ------------------------------------------------- I am able to execute the shell script through putty. But when I try to execute with informatica... (1 Reply)
Discussion started by: sunil0106
1 Replies

8. Shell Programming and Scripting

Executing multiple commands in a file at same time

Hi Am having file.ksh as below wc -l file1.txt wc -l file2.txt wc -l file3.txt wc -l file4.txt i want all the commands in this file to execute in same time please help Thanks in advance (1 Reply)
Discussion started by: ragu.selvaraj
1 Replies

9. Linux

How to run commands with pipe from text file?

Hello, I have standard loop while read -r info; do command $info done < info in info text file I have multiple commands each on line that I want to execute. When I used them in console they worked, but not with this loop. This is one of the commands in info file: grep... (4 Replies)
Discussion started by: adamlevine
4 Replies

10. Shell Programming and Scripting

Executing bash file with sudo for the second time, leads to permission denied, for some commands

I have a script that checks if the script has been ran with sudo. If the script is not ran as sudo, the current script is being executed with exec sudo bash. You are asked for a password, you type in the password, success. Everything is perfect - the commands inside the script are ran as sudo.... (1 Reply)
Discussion started by: boqsc
1 Replies
LINTIAN-INFO(1) 					User Contributed Perl Documentation					   LINTIAN-INFO(1)

NAME
       lintian-info - give detailed information about Lintian's error tags

SYNOPSIS
       lintian-info [log-file...]

       lintian-info --tags tag ...

DESCRIPTION
       The lintian-info command parses the output of the lintian command and gives verbose information about the listed Lintian error tags, parses
       a Lintian override file and gives verbose information about the tags included, or (if given the -t or --tags option) explains a given tag
       or tags.

       If no log-file is specified on the command line, this command expects its input on stdin. Thus, the output of lintian can either be piped
       through lintian-info or a log file produced by lintian can be processed with this command.  (Note, though, that the lintian command has a
       command line option -i to display the same results as lintian-info, so you will not normally need to pipe the output of lintian into this
       command.)

OPTIONS
       -a, --annotate
	   Read from standard input or any files specified on the command line and search the input for lines formatted like Lintian override
	   entries.  For each one that was found, display verbose information about that tag.

       -h, --help
	   Display usage information and exit.

       --profile prof
	   Use the severities from the vendor profile prof when displaying tags.  If the profile name does not contain a slash, the default
	   profile for than vendor is chosen.

	   If not specified, lintian-info loads the best profile for the current vendor.

	   Please Refer to the Lintian User Manual for the full documentation of profiles.

       -t, --tags
	   Rather than treating them as log file names, treat any command-line options as tag names and display the descriptions of each tag.

EXIT STATUS
       If -t or --tags was given and one or more of the tags specified were unknown, this command returns the exit code 1.  Otherwise, it always
       returns with exit code 0.

SEE ALSO
       lintian(1)

AUTHORS
       Niels Thykier <niels@thykier.net>

       Richard Braakman <dark@xs4all.nl>

       Christian Schwarz <schwarz@monet.m.isar.de>

perl v5.14.2							    2013-02-16							   LINTIAN-INFO(1)
All times are GMT -4. The time now is 05:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy