10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am writing a bash script that automatically generates a macro program.
I want to have an echo on multiple lines and getting an error
/home/chaos/instru-correct.sh: line 309: command line is: command not found
I am using
echo "# The general synopsis of the $mfl" \
... (2 Replies)
Discussion started by: kristinu
2 Replies
2. Shell Programming and Scripting
I'm trying to echo the release version of some of our Linux servers. Typically I do these types of things by "catting" a text file with the host names, "ssh-ing" to the host and running my string.
This is what I've written
for i in `cat versions.txt` ; do echo $i ; ssh $i cat /etc/issue |... (5 Replies)
Discussion started by: lombardi4851
5 Replies
3. Shell Programming and Scripting
Hi, I am trying to make a script to manage log. I want to write the name of the .gz I moved and the date :
for i in `ls $replog/*.gz`
do
echo " $i "
`echo $i date +%d:%m:%Y`
`echo $datee `>> $replog/mrnet.log
mv $i /var/log/vieux-logs
done
I need to echo... (10 Replies)
Discussion started by: Dabless
10 Replies
4. Shell Programming and Scripting
Hi,
I have a problem with passing a echo output into a variable in bash
file='1990.tar'
NAME='echo $file | cut -d '.' -f1';
echo $NAME
the result is
echo $file | cut -d . -f1
however with this one,#!/bin/bash
file='1990.tar'
echo $file | cut -d '.' -f1
the result is what I... (2 Replies)
Discussion started by: 1988PF
2 Replies
5. Shell Programming and Scripting
Newbie to bash here. I think this is fairly simple, but I have searched and cannot figure it out. In the code below, I am searching an array for an IP address, and then printing the IP address if found. However, I would like to print the actual variable found such as 2.2.2.2=2, but cannot figure... (1 Reply)
Discussion started by: lozwell
1 Replies
6. Shell Programming and Scripting
I am using the echo command to send the output to the file.
I am using the following code:
echo "service started successfully\n" > log
But when I do:
cat log
I get:
service started successfully\n
Instead of a newline after the "successfully"
Why is that and how can I fix it? (3 Replies)
Discussion started by: programAngel
3 Replies
7. Shell Programming and Scripting
Hi all,
Basically Im trying to put the current time in a script in BASH. Tried the watch command, but its not really what I want.
I will have lots of things in this script, current date and time being just a few).
Any ideas? (4 Replies)
Discussion started by: mikejreading
4 Replies
8. UNIX for Advanced & Expert Users
Hello,
I have lib file which contain a function that get text to print on screen by echo command.
Several scripts are inculde this lib and use this function.
Each one of them is written in different shell language (sh ksh & bash).
This causing some issues when using backslash charater as... (4 Replies)
Discussion started by: Alalush
4 Replies
9. Shell Programming and Scripting
Hi folks,
I need to stop printing a new line after echoing a string in KSH. i know bash provides
echo -n "string"
what is the ksh equivalent for this ? (3 Replies)
Discussion started by: mudhireddy
3 Replies
10. UNIX for Dummies Questions & Answers
without using ls, just using echo so purely pattern matching
I can say echo */ <-- lists directories
but how would I match files? surely something like *!/ or * but neither work ?
it seems like there isn't much that I can put in but surely i should be able to put any ascii... (1 Reply)
Discussion started by: james hanley
1 Replies