10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am trying to get a dollar sign variable to be expanded in single quotes. Not sure what I am doing wrong. I have tried every way I can think of.
for i in `cat file1`
do
for j in `cat file2`
do
ssh $i 'systemctl is-enabled "${j}" ';
done
done... (4 Replies)
Discussion started by: cokedude
4 Replies
2. Shell Programming and Scripting
HI
I am trying to use the following code in the shell script (using grep)
usage()
{
echo "Usage: ./$0 <file name> <interval> <pattern>"
}
METRICS_FILE=$1
INTERVAL=$2
PATTERN="$3"
..
if
then
PATTERN="grep Gx"
fi
COUNT=`cat ${METRICS_FILE} | "${PATTERN}" |egrep... (8 Replies)
Discussion started by: asifansari
8 Replies
3. UNIX for Advanced & Expert Users
I'm looking at a config file with dollar signs. What do the dollar signs mean in front of a directory?
dir = ./demoCA # Where everything is kept
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
new_certs_dir = $dir/newcerts # default... (1 Reply)
Discussion started by: cokedude
1 Replies
4. Shell Programming and Scripting
Hello there,
first of all, don't hesitate to notify me if I misbehave. I'm a newbe in the use of this site, and in unix too (in english as well :-)
Well, if someone hat a little time to waste, could he explain to me this strange behavior.
I'm using ksh under AIX.
cdeset=$(su - db2inst1 -c... (8 Replies)
Discussion started by: skitoc
8 Replies
5. Shell Programming and Scripting
I am trying to do what I thought should be a simple substitution, but I can't get it to work.
File:
Desire output:
I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
6. Shell Programming and Scripting
hi,
I have been trying to acheive the following task for a while now, but failed.. Need help, experts please help!
This is what I am trying to do:
- I am writing to a flat file the name of the source to be copied and the destination path as to where it is to be copied to.
Sample flat file:... (7 Replies)
Discussion started by: abdulhusein
7 Replies
7. Shell Programming and Scripting
Dear Masters,
Need your help for this small query.
I am trying to get all the strings that starts with a blank space as output.
Limitation is , it should be done only through AWK.
Input will be:
aa
_1bbb
c-ccc
ddd
eeeee
ff
Output should be:
_1bbb
c-ccc
eeee
ff (5 Replies)
Discussion started by: patric2326
5 Replies
8. Shell Programming and Scripting
Hi
I'm trying to substitute word "January" with word "March" in my script but in certain lines only.
I have couple words containing pattern that I want to substitute e.g.
- log.January.1.array
- log_January_1_array_1
- log.January.1.array
- log_January_1_array_11
Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies
9. Shell Programming and Scripting
I'd like to make a script that I can execute every time I sign on to my linux box that keeps track of the time and allows to me to add a remark to a file. So basically once I log in, I run the script, and it outputs the date and time to a text file (log.txt). But that isn't my problem.
I need... (1 Reply)
Discussion started by: Glider
1 Replies
10. UNIX for Dummies Questions & Answers
How do I substitute a word throughout a file? For example change all instances of the word John to Mark. This would be in vi for korn shell. (10 Replies)
Discussion started by: lesstjm
10 Replies