10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Good afternoon all,
I want to ask how to change some letter in my file with other letter in spesific line
eg.
data.txt
1
1
1
0
0
0
0
for example i want to change the 4th line with character 1.
How could I do it by SED or AWK.
I have tried to run this code but actually did not... (3 Replies)
Discussion started by: weslyarfan
3 Replies
2. Shell Programming and Scripting
Hi to all in forum,
I'm trying to convert the letter number between 1 (A) and 26 (Z), that part is working, my issue is how to assign the printf output to a variable:LetterNumber=10
printf "\x$(printf %x $((${LetterNumber}+64)))"
$ J
#The problem, how to assign printf output (J in this... (8 Replies)
Discussion started by: Ophiuchus
8 Replies
3. Shell Programming and Scripting
I am trying to make a script that takes a word and each letter up and turns it into a separate variable. My code currently does not work but I feel I just need to tweak one thing that I am unsure of.
(ex: if forum was typed in letter1=f; letter2=o; letter3=r;...)
Thank you
count=1;
... (7 Replies)
Discussion started by: crimputt
7 Replies
4. Shell Programming and Scripting
Hi
I have e.g. VAR1=january and I need to change it into VAR1=January.
How to change value of VAR1 variable to always set first character uppercase and other lowercase ?
thx for help. (9 Replies)
Discussion started by: presul
9 Replies
5. Shell Programming and Scripting
Hi all,
I want to set the last 4 letter in the filename as a variable.
For example, i have AB1234.txt file and i need to have last 4 letter as a variable.
It should be like ;
get last four letter
set var = 1234
How can i write this in C shell??
Thanks,
zibi (3 Replies)
Discussion started by: zibi
3 Replies
6. Shell Programming and Scripting
Total Bash noob, have been successful in doing my script by searching and looking at examples, but I need some assitance with this one, just can't figure it out.
In the Bash script I am trying to capitalize the first letter of every word in a string, ideally not changing other capitalization.
... (5 Replies)
Discussion started by: randyharris
5 Replies
7. Shell Programming and Scripting
Hi All,
I need to have a sed command insert the letter i at the end of some lines in a file.
Problem is that where I want to add the i is after variables that change in each file
eg, tsal314384'
tsal315386'
tsal317392'
I need to have it like this
... (2 Replies)
Discussion started by: outthere_3
2 Replies
8. Shell Programming and Scripting
L=0
cat test.sh | while read line
do
L='expr $1 + 1'
echo $L
done
echo $l
>>> the echo $L at the end produces 0 but i actually want it to produce the number of lines - any idea why this is happening? (16 Replies)
Discussion started by: penfold
16 Replies
9. UNIX for Advanced & Expert Users
Dear friends,
i am writing csh script
i have one dat file containing following data.like this.
08FD3 03A26 000FA0 FFFF0 BBA0F 00000 00000
from the above file i want to read each letter and store it in one variable.
how it is possible.
please help (7 Replies)
Discussion started by: rajan_ka1
7 Replies
10. UNIX for Dummies Questions & Answers
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies