10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to begin to troubleshoot this perl error that I keep getting, yet I get output is produced. The error is Use of uninitialized value in join or string line 175, <MANNO> line 7138 and below is line 175:
I am not too sure what the error is but since not every line has an error on it, I... (1 Reply)
Discussion started by: cmccabe
1 Replies
2. Shell Programming and Scripting
I have a file with 20 blank spaces.
I want to substitute each blank space for a string, and part of that string should include an incremental number
Code
while read line3
do
awk -v var=${line3} '{i=var; sub("^]*$", "\\&\n@target G0.S"'$i'"\n@type xy"); print $0}'... (1 Reply)
Discussion started by: chrisjorg
1 Replies
3. UNIX for Dummies Questions & Answers
can while do make aloop as do while in c language ? (1 Reply)
Discussion started by: teefa
1 Replies
4. Programming
Okay so I am just starting programming c++. I just started started to red "C++ for Dummies yesterday and theres a lot of things I do not understand from this book and this source code especially. I will first post the full source code and then post questions about certain thing, usually what they... (2 Replies)
Discussion started by: orszhak
2 Replies
5. Shell Programming and Scripting
Hey forum,
I have a problem with a script what used to work, but suddenly is not working anymore. I have been trying different things for an hour now and I give up :D .
#!/bin/sh
asukoht=`pwd`
template=$1
for values in... (4 Replies)
Discussion started by: mario8eren
4 Replies
6. Solaris
Dear All
i am getting "bad substituion" error in the follwing piece of code when i run from crontab.however it works if i run directly from my machine.
#!/bin/bash
for i in `cat abc`
do
part1=${i:0:12} ;
part2=${i:13:27} ;
echo "$part1,$part2">> def
done (1 Reply)
Discussion started by: asadlone
1 Replies
7. UNIX for Advanced & Expert Users
I have lines like:
Mg2.qns W=0.175u
Mg2.qpsb W=0.175u
Mg4.qns W=0.175u
Mg4.qpsb W=0.175u
Which I need to become:
Mg2.qns W=wmg2qns
Mg2.qpsb W=wmg2qpsb
Mg4.qns W=wmg4qns
Mg4.qpsb W=wmg4qpsb
To acheive this individually line by line I use a command like:... (3 Replies)
Discussion started by: ggggdddd
3 Replies
8. Shell Programming and Scripting
@xray =~ s/^ *//g;
@xray =~ s/ *$//g;
@xray =~ s/\s+/ /g;
Guess I have a two part question ...
First
Is there a way to make substitutions, remove leading spaces, trailing spaces, and crunch multiple spaces into a single space, to the entire array, or must the substitutions be done on on... (1 Reply)
Discussion started by: popeye
1 Replies
9. Shell Programming and Scripting
Folks,
I've been trying to use the ENV variable with slashes(/) in its value inside the sed substitution..
Sed 's/myval/'$MYVAL'/' file1 >> file.tmp
If MYVAL=<sometext>, it works.
if MYVAL=/home/venkat, it doesnt.
***************************
bash-2.05$ export VAL=/home/venkat... (5 Replies)
Discussion started by: gvsreddy_539
5 Replies
10. What is on Your Mind?
i'm trying to learn unix and i posted a question and what i was typing from school. i can't figure it out. how am i supposed to learn , when i get shutdown by an admin. for posting a homework question. doesn't make any sense. its a dumb rule. thanks for helping (4 Replies)
Discussion started by: AtomJ22
4 Replies