10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
I have a string variable named L_TEMP to test a very simple filter.
L_TEMP="50AwL.|KWp9jk"
I want to insert a non printable character between K and W.
I have try this :
linux-g65k:~ # a='50AwL.|K'
linux-g65k:~ # b='Wp9jk'
linux-g65k:~ # L_TEMP="$a$'\x07'$b"
linux-g65k:~ # echo... (6 Replies)
Discussion started by: jcdole
6 Replies
2. Shell Programming and Scripting
Hi,
I have a problem where I need to make this input:
nameRow1a,text1a,text2a,floatValue1a,FloatValue2a,...,floatValue140a
nameRow1b,text1b,text2b,floatValue1b,FloatValue2b,...,floatValue140b
look like this output:
nameRow1a,text1b,text2a,(floatValue1a - floatValue1b),(floatValue2a -... (4 Replies)
Discussion started by: nricardo
4 Replies
3. Shell Programming and Scripting
Help request,
I have tsted this line of code for hours. The first line works and the second line returns the message " sed: command garbled.....". This
is running on solaris. The "${} variables all have good values when echoed.
## /bin/sed -n '1,25p' ${file} >> ${MailFile}
... (3 Replies)
Discussion started by: millerg225
3 Replies
4. UNIX for Dummies Questions & Answers
So I have a bunch of strings in a file.
Example Line
./prcol/trt/conf/conf-app/jobdefinition/trt-pre-extr-trt-step.jdef
Intended Result
pre-extr-trt-step
So far I have parsed it out to the last bit,
echo $line | cut -d'/' -f7 | cut -d. -f1Result
trt-pre-extr-trt-step
So I added a... (2 Replies)
Discussion started by: J-Man
2 Replies
5. Shell Programming and Scripting
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies
6. Shell Programming and Scripting
Hi all ,
I have to write a shell script that takes a number as input , like 123
and the output will be 6 ,i.e the output will be the sum of digits of the input.
I have an idea as follows,
echo "123"|fold -1|tr '\n' '+'|bc
But the problem is after " echo "123"|fold -1|tr '\n' '+' "... (5 Replies)
Discussion started by: M.Choudhury
5 Replies
7. Shell Programming and Scripting
I'm working with a large file with multiple records, each record begins with ISA. The issue is, sometimes ISA is at the start of the line, sometimes it's in the middle of the line. So before I can csplit my main file into multiple records, I have to get each record header onto its own line.
... (7 Replies)
Discussion started by: verge
7 Replies
8. UNIX for Dummies Questions & Answers
hi all,
i would like your help with the "sed" command
GIVEN a file with the following format, let s say :
In the house, there are
no.PCs 3
WHAT i would like to do is to replace the value "3" with another number
IF i type the sed command like this :
sed 's/'no.PCs3'/'no.PCs1'/g' >... (6 Replies)
Discussion started by: OneDreamCloser
6 Replies
9. Shell Programming and Scripting
Hello,
i use sed '/good/ a\INSERT' 1.txt command for insert a text on my file on linux butit does not work see the output :
# sed '/good/ a\INSERT' 1.txt
if_test=iso
ifup=eth0
Hello
World
Bye
now
good
INSERT
# cat 1.txt
if_test=iso
ifup=eth0
Hello
World
Bye
now (1 Reply)
Discussion started by: blackmetal
1 Replies
10. Shell Programming and Scripting
I have a command that when ran it will have an output such as
string LongerString
string2 longerString2
More MoreStrings
seperated by tabs. The command lists domains and their accounts set up in my server admin software (interworx).
The end result will be that it will run rsync for... (2 Replies)
Discussion started by: sweede
2 Replies