10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello!
#!/usr/bin/env python
hn = "simsa-svr"
for container in containerslist:
Name = container
I want to print Name along with hn i,e simsa-svr. I tried like Name = container'-'.join(hn) did not work.
Needed result: lilly2232321-simsa-svr (2 Replies)
Discussion started by: ashokvpp
2 Replies
2. Shell Programming and Scripting
Here is the structure of my file:
MyFile.txt
g-4.n.g.fr 10.147.243.63 g-4.n.g.fr-w1
Here is my sript:
test.sh
#! /bin/sh
ip=10.147.243.63
worker=$(grep -e $ip $1 | awk '{ print $3; }')
echo ""
echo $worker
echo ""
echo $worker
echo ""
echo "$worker.v.1"
echo... (7 Replies)
Discussion started by: chercheur111
7 Replies
3. Shell Programming and Scripting
Hi all,
Here is the data file:
- want to match only lan3 in the output .
- not lan3:1
file :
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""... (2 Replies)
Discussion started by: rveri
2 Replies
4. Shell Programming and Scripting
I have thousands of files in a directory. I need to find/list all files that have the below matching string -
RETURNCODE: "1017"
Thank you! (5 Replies)
Discussion started by: esmgr
5 Replies
5. Shell Programming and Scripting
Hi,
Need to capture a string between 1st & last quote.
String can be anything like
a b "c" d e
Output: c
a "b c" d e
Output: b c
a "b c" d "e" f
Output: b c d e
sed 's/.*"\(.*\)".*/\1/g'
Above helps me to find the string between last quote.
Need to find the string between 1st &... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies
6. Shell Programming and Scripting
I'm a beginner with shell and tried to do this per hours and everytinhg gives different want i do.
So
I have a lot of file in *.csv ( a.csv, b.csv ...)
in each file csv , it has some fields separeted by commas.
-----
"joseph";"21","m";"groups";"j.j@gmail.com,j.j2@hotmail.com"... (6 Replies)
Discussion started by: flaviof
6 Replies
7. Shell Programming and Scripting
I have a script which I call and pass a text string to it. This string is then is assigned to a variable in the script. I then call another script and pass that variable to the second script, but when I do, the quotes are lost and the second script gets a total of three variables 'my', 'lovely' and... (3 Replies)
Discussion started by: iskatel
3 Replies
8. Shell Programming and Scripting
I have a line in multiple scripts:select into table /dir1/dir2/file.dat
dir1 and dir2 are the same but file.dat is different from script to script.
I need to include /dir1/dir2/file.dat into double quotes in each file of my directory:select into table "/dir1/dir2/file.dat" (13 Replies)
Discussion started by: surfer515
13 Replies
9. Programming
This is a simple question...
char *str = NULL;
int num = 0;
scanf ("%d", &num);
str = ???
I want str to point to the string num.txt
For e.g: If user enters num = 5,
str should point to "5.txt"
How do I do that ?
Thanks (2 Replies)
Discussion started by: the_learner
2 Replies
10. Shell Programming and Scripting
hey,
I want to concat whole bunch of strings together but somehow they don't turn out the way I want them to
a="HELLO "
b="WORLD "
c=$a$b
I was expecting c to be "HELLO WORLD " but it... (1 Reply)
Discussion started by: mpang_
1 Replies