10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there a better way to show the results of a file on the screen other then less , which exits the program and displays:
Input Status
AB026906.1:c.274G>T OK
c:/Users/cmccabe/Desktop/Python27/syntax_verify.txt (END)
authenticate() {
printf "\n\n"
less... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. UNIX for Dummies Questions & Answers
Hi guys,
Been messing around with shell programming for a couple of days and I found something that was pretty odd in the behavior of the echo command. Below is an example-:
When I type the following in my /home directory from my lxterminal in Debian-:
echo "`ls -l`"
I get the... (2 Replies)
Discussion started by: sreyan32
2 Replies
3. Shell Programming and Scripting
I am using echo in bash. Have created a function prargv which takes a number of arguments.
Example:
prargv "-e" "--examples"
Inside prargv, I want to print all the arguments using echo
echo "$@"
This returns
--examples
rather than
-e --examples"
This problem can be fixed... (3 Replies)
Discussion started by: kristinu
3 Replies
4. Shell Programming and Scripting
# echo 'export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk '{print \$1}')' >> new_file
#
# cat new_file
export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk {print $1})
#
Now how to echo the quotes around the... (2 Replies)
Discussion started by: proactiveaditya
2 Replies
5. Shell Programming and Scripting
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies
6. Shell Programming and Scripting
hi,
just wanted to make a shortcut of this one
a="a b c"
b=`echo $a | awk '{print $2}'`
echo "the middle is $b"
why can't i do this:
a="a b c"
echo "the middle is ${`echo $a | awk '{print $2}'`}" <- bad substitution :wall:
thanks (6 Replies)
Discussion started by: h0ujun
6 Replies
7. Shell Programming and Scripting
Hi everyone,
I'm echo some text with extended ascii characters as below:
echo -e "Pr\xE9sentation du spectacle" > output
or
echo -e "Présentation du spectacle" > outputIf I open the file created I see this text
Présentation du spectacleThe text is shown correctly in this created file when... (7 Replies)
Discussion started by: Ophiuchus
7 Replies
8. Shell Programming and Scripting
echo `echo ` doesn't echoes anything. And it's logic. But
echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo"
(too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies
9. Shell Programming and Scripting
So in my shell i execute:
{ while true; do echo string; sleep 1; done } | read line This waits one second and returns.
But
{ while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly.
I have tried this in bash as well as zsh,... (2 Replies)
Discussion started by: ulidtko
2 Replies
10. UNIX for Dummies Questions & Answers
Here is the file named tuwork..........
209 200 WZ 6529 SKTNCA01X4X C POI LODI LODI 738 SKTNCA0127T LOD
Here is the scipt.......
cat tuwork |
while
read rva
do
num=`echo $rva | cut -d" " -f1-2`
reg=`echo $rva | cut -c10`
ocn=`echo $rva | cut -c12-15`
x=`echo $rva | cut -c29`... (3 Replies)
Discussion started by: shorty
3 Replies