If set, and the cmdhist option is enabled, multi-line commands are saved to the history with embedded newlines rather than using semicolon separators where possible.
How to run several bash commands put in bash command line without needing and requiring a script file.
Because I'm actually a windows guy and new here so for illustration is sort of :
$ bash "echo ${PATH} & echo have a nice day!"
will do output, for example:... (4 Replies)
Here is the text that I was to run sed on. In this text I want to insert a semi colon ';' before 'select a13.STORE_TYPE STORE_TYPE,' and after 'from ZZMR00 pa11'
Input text:
insert into ZZMQ01
select pa11.STATE_NBR STATE_NBR,
pa11.STORE_TYPE STORE_TYPE,
... (9 Replies)
I have been trying this a lot of different ways and haven't found too much online. Here's what I've got so far:
j=0
declare -a first
zero=(`cat $tmpfile`)
for i in "${zero}"
do
command $i >> "${first}"
... (4 Replies)
Hello. I'm making a (hopefully) simple shell script xml parser that outputs a file I can grep for information. I am writing it because I have yet to find a command line utility that can do this. If you know of one, please just stop now and tell me about it. Even better would be one I can input... (10 Replies)
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Your shell script should continue to execute until the user selects option 4
2. Relevant commands, code,... (2 Replies)
Hi,
Is it possible to accept a filename as command line parameter and then write to that file using command redirection? i tried the below script.
outputfile=`echo $1`
echo "Writing to file" > 'echo $outputfile'
exit $returncode
but it isnt working. is there any other way to... (9 Replies)
I'm writing a bash script to search the contents of a postfix log. To keep the script's output readable (since multiple lines from the log file need to be echo'ed) I am setting the IFS variable to an empty string so that the line breaks in my grep results are preserved. I am storing the results... (4 Replies)
Hi all,
I am caught up in a problem .... tried all possible ways i knew .. but ended up in big zero ... ;-(
I have a file as below ..
$ cat siv.txt
1234567890BF00522000095ibsadministrator@ae.ge.com ibsadministrator@ae.ge.com
Note the spaces in between .... I am... (1 Reply)