10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I'd say I'm having this weird problem where my script isn't taking the value off a variable or printing it. My code is like this:
set count_C= `grep -c C mols`
set count_H= `grep -c H mols`
set count_O= `grep -c O mols`
sed -i '7,7 s/$/ $count_C $count_O $count_H/g' input It... (8 Replies)
Discussion started by: saleheen
8 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I have a trivial question but I dont know how to solve it.
So basically I'm working on a USB key and I have a directory with some scripts which I use to work on files present in other directories within the USB or sometimes on the main harddisk too. The problem is every time I have to... (3 Replies)
Discussion started by: pawannoel
3 Replies
3. UNIX for Dummies Questions & Answers
In root dir i have created a .profile file and added variable and assigned a path to it:
a = '/dir/dir'
export a
but when i echo (echo $a) the path or use this variable the value or path not getting displayed.
i tried executing the .profile and logging out and logging in, didnt workout. am... (1 Reply)
Discussion started by: abhi_n123
1 Replies
4. Shell Programming and Scripting
Hello All,
I am trying to figure out how to use the read command. I have a txt file that has rows looking something like this:
1 2 3 4 5 6 7 8 9
where each number represents an entry of various characters deliminated by tabs.
My goal is to set entries 2-7 as a variable/string that I... (3 Replies)
Discussion started by: Torinator
3 Replies
5. Shell Programming and Scripting
Hey all, I was wondering if someone would take a look at this script I'm working on. I don't know if i have the syntax correct for my variables and if the for loop is written correctly.
any assistance would be greatly appreciated.
#!/usr/bin/bash
###########################################... (12 Replies)
Discussion started by: em23
12 Replies
6. Shell Programming and Scripting
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Discussion started by: aarora_98
6 Replies
7. Shell Programming and Scripting
Hi
I am trying to do the substitution using the 'sed' editor. In the line below
I am trying to substitute all instances of XXX by the value of the variable PX
sed 's/XXX/${PX}/g' ${TEMPLETE} > ${TEMPLETE}.${PX}
The problem is that 'sed' editor takes ${PX} literary (without retrieving the... (2 Replies)
Discussion started by: aoussenko
2 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to define a variable named sin
I already have a variable named cos, which has the value "hello"
I want sin to have the value of "hellothere",
so sin would be something like
sin = $cos & "there"
but I'm not sure that I know the syntax.
Can anyone help?
:confused: (4 Replies)
Discussion started by: sailorliones
4 Replies
9. AIX
For some reason something has changing in my AIX environment where when I type:
ACLEDIT filename
...I get:
3002-104 acledit: EDITOR environment variable must be full pathname
I know I need to reset the EDITOR variables path to /usr/bin/vi but I can't remember the syntax anyone? (2 Replies)
Discussion started by: heprox
2 Replies
10. UNIX for Dummies Questions & Answers
I am writing a script that needs to accept numbers into a variable by prompting and using the code
read num
case $num in
000)
break
;;
*)
I am fairly new to unix and am loving the versatility of the language but need a little shove in the right... (1 Reply)
Discussion started by: noobian
1 Replies