10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I did a review of some threads to see if someone had come across this problem.
My system is an oracle virtual box solaris 10 installed on a windows 10 system.
Right now I am learning scripting and am just playing with the env variables.
I am trying to update the PATH to... (9 Replies)
Discussion started by: bdby
9 Replies
2. Shell Programming and Scripting
Hello,
I'm trying to create multiple commands using a variable input from another file but am not getting any successful results.
Basically, file1.txt contains multiple lines with single words:
<file1.txt>
yellow
blue
black
white
I want to create multiple echo commands with these... (8 Replies)
Discussion started by: demmel
8 Replies
3. Shell Programming and Scripting
I am extracting two pieces of information from the following file: /proc/cpuinfo, that I need to merge into one report.
The first command:
grep -i processor /proc/cpuinfo | awk '{print $1$2,$3}'
yields:
processor: 0
processor: 1
processor: 2
processor: 3
The second command:
grep -i... (4 Replies)
Discussion started by: jamarsh
4 Replies
4. UNIX for Dummies Questions & Answers
Hi experts,
why does
$ echo "one two three" | awk '{$3="my tree"; print $0}'
one two my tree
work,
but
$ var="my tree"
$ echo "one two three" | awk '{$3="'$var'"; print $0}'
awk: {$3="my
awk: ^ unterminated string
does not work?
How can the variable tha contains a space be... (2 Replies)
Discussion started by: GermanicGalore
2 Replies
5. Emergency UNIX and Linux Support
Dear Unix experts
Moved from "Shell Programming and Scripting "
I want to define a variable which contains dynmic and static part, daynamic part is the first field.
Sample of data
dddd aaaa sssss 12345
ssss 2323 234234 4242
dddd 3223 34234 54353
ssss 24234 3434 42342
dddd rwrw 423423... (2 Replies)
Discussion started by: yahyaaa
2 Replies
6. Shell Programming and Scripting
Dear Unix experts
I want to define a variable which contains dynmic and static part, daynamic part is the first field.
Sample of data
dddd aaaa sssss 12345
ssss 2323 234234 4242
dddd 3223 34234 54353
ssss 24234 3434 42342
dddd rwrw 423423 werwer
nawk 'BEGIN {FS=" "}{... (4 Replies)
Discussion started by: yahyaaa
4 Replies
7. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
8. Shell Programming and Scripting
Hey , I'm new to Bash and am having trouble with writing a script.
I have a variable and want to use it to create a tar file, but, I am having problems. Can anyone tell me what I'm doing wrong?
filestr=`date "+%y-%m-%d %H.%M.%S"`.tar
tar -cvf $filestr test.txt
So, basically,... (3 Replies)
Discussion started by: beefeater267
3 Replies
9. Shell Programming and Scripting
Hi
I need to write a script where there the user enters 3 input parameter
variable
number
the program should ask the user left or right
if it is left , the number specified that many spaces should be added to the value in front of the value and saved in the samee variable itself and if it is... (5 Replies)
Discussion started by: viv1
5 Replies
10. Shell Programming and Scripting
Hi,
How to check if a variable is having spaces or empty in shell scripts.
Please help
esham (4 Replies)
Discussion started by: esham
4 Replies