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. 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
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`
echo " $i "
`echo $i date +%d:%m:%Y`
`echo $datee `>> $replog/mrnet.log
mv $i /var/log/vieux-logs
I need to echo... (10 Replies)
Discussion started by: Dabless
4. Shell Programming and Scripting
I have a problem with passing a echo output into a variable in bash
NAME='echo $file | cut -d '.' -f1';
the result is
echo $file | cut -d . -f1
however with this one,#!/bin/bash
echo $file | cut -d '.' -f1
the result is what I... (2 Replies)
Discussion started by: 1988PF
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 22.214.171.124=2, but cannot figure... (1 Reply)
Discussion started by: lozwell
6. Shell Programming and Scripting
Why does echo supress line breaks in bash?
I'm working on a script that starts like this:
words=`sort list.txt | uniq`
echo $words | wc -l
I need to number the lines and then do other stuff. I'd use jot, but it's not installed, so I hope I can get seq to do what I want. But first I need to... (2 Replies)
Discussion started by: mregine
7. Shell Programming and Scripting
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
8. UNIX for Advanced & Expert Users
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
9. Shell Programming and Scripting
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
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