Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Executing several commands in a text file Post 302968821 by Swathe on Monday 14th of March 2016 11:57:18 PM
Old 03-15-2016
3000 commands in a row could get messy without anyone knowing what is being run. As long as nothing in there violates any sort of NDA etc I'd definitely get a few sets of eyes to go over it in case there are any hidden surprises.

I'm also going to go ahead and say make sure you put comments in the file to describe whats happening etc etc.
 

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
Bencode(3pm)						User Contributed Perl Documentation					      Bencode(3pm)

NAME
Bencode - BitTorrent serialisation format VERSION
version 1.4 SYNOPSIS
use Bencode qw( bencode bdecode ); my $bencoded = bencode { 'age' => 25, 'eyes' => 'blue' }; print $bencoded, " "; my $decoded = bdecode $bencoded; DESCRIPTION
This module implements the BitTorrent bencode serialisation format as described in <http://www.bittorrent.org/protocol.html>. INTERFACE
"bencode( $datastructure )" Takes a single argument which may be a scalar or a reference to a scalar, array or hash. Arrays and hashes may in turn contain values of these same types. Simple scalars that look like canonically represented integers will be serialised as such. To bypass the heuristic and force serialisation as a string, use a reference to a scalar. Croaks on unhandled data types. "bdecode( $string [, $do_lenient_decode [, $max_depth ] ] )" Takes a string and returns the corresponding deserialised data structure. If you pass a true value for the second option, it will disregard the sort order of dict keys. This violation of the bencode format is somewhat common. If you pass an integer for the third option, it will croak when attempting to parse dictionaries nested deeper than this level, to prevent DoS attacks using maliciously crafted input. Croaks on malformed data. DIAGNOSTICS
"trailing garbage at %s" Your data does not end after the first bencode-serialised item. You may also get this error if a malformed item follows. "garbage at %s" Your data is malformed. "unexpected end of data at %s" Your data is truncated. "unexpected end of string data starting at %s" Your data includes a string declared to be longer than the available data. "malformed string length at %s" Your data contained a string with negative length or a length with leading zeroes. "malformed integer data at %s" Your data contained something that was supposed to be an integer but didn't make sense. "dict key not in sort order at %s" Your data violates the bencode format constaint that dict keys must appear in lexical sort order. "duplicate dict key at %s" Your data violates the bencode format constaint that all dict keys must be unique. "dict key is not a string at %s" Your data violates the bencode format constaint that all dict keys be strings. "dict key is missing value at %s" Your data contains a dictionary with an odd number of elements. "nesting depth exceeded at %s" Your data contains dicts or lists that are nested deeper than the $max_depth passed to "bdecode()". "unhandled data type" You are trying to serialise a data structure that consists of data types other than o scalars o references to arrays o references to hashes o references to scalars The format does not support this. BUGS AND LIMITATIONS
Strings and numbers are practically indistinguishable in Perl, so "bencode()" has to resort to a heuristic to decide how to serialise a scalar. This cannot be fixed. Please report any bugs or feature requests through the web interface at <http://github.com/ap/Bencode/issues>. AUTHOR
Aristotle Pagaltzis <pagaltzis@gmx.de> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Aristotle Pagaltzis. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.3 2010-07-06 Bencode(3pm)
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy