10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I have had a requirement where I need to move data to a new line based on a text .So basically as soon as it encounters :61: it should move to a new line
Source Data :
:61:D100,74NCH1 :61:D797,50NCH2 :61:D89,38NCHK2 :61:D99,38NCHK12 :61:D79,38NCHK22 :61:D29,38NCHK5
Target Data... (11 Replies)
Discussion started by: kamijia83
11 Replies
2. Shell Programming and Scripting
I have file with SQL output as
0001 firstname1 lastname1 0002 firstname2 lastname2 0003 firstname3 lastname3 0004 firstname4 lastname4
Expected output :
0001 firstname1 lastname1
0002 firstname2 lastname2
0003 firstname3 lastname3
0004 firstname4 lastname4
Let me know if this can... (9 Replies)
Discussion started by: sameermohite
9 Replies
3. Shell Programming and Scripting
I am having a peculiar problem. First I run the code below to append 0 at the start of each line in some hundreds of files that I have in a directory. These files have each word in a newline.
for f in *.dat; do
echo "0" > tmpfile
cat $f >> tmpfile
mv tmpfile $f
done
Then I run this... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
4. Shell Programming and Scripting
Hi All,I am facing the below problem I have set a variable:
a=`cat a.txt| grep "mad" | cut -c 30-50`the output is coming
echo $a1
10 Mad300 3215however the actual ouput is
1.10 Mad300 3215There are 4spaces between 300 and 3215 so if i do:
echo "$a" I am getting correct output:
1.10... (3 Replies)
Discussion started by: mad_man12
3 Replies
5. UNIX for Dummies Questions & Answers
Can someone help me on this. I have a file that has a long line just like below. The long line keeps on being truncated to the next line (new line + space) for some reason. Basically, I just need to remove this problem. Hope somebody can help! Thanks!
INPUT FILE:
structuralObjectClass:... (4 Replies)
Discussion started by: Orbix
4 Replies
6. Shell Programming and Scripting
Input:
--------------------------
123asd 456sdasda 789a
-------------------------
output wanted:
---------------------
123asd
456sdasda
789a
----------------------
I want this by sed in simple way
please help (I know by: tr ' ' '\n' < inputfile )I want it by sed only (5 Replies)
Discussion started by: RahulJoshi
5 Replies
7. Shell Programming and Scripting
Hi,
I have a problem where some of the records I need to process have the first address field as something like "10Walpole Street" where obviously I want it to be "10 Walpole Street". I know I need to somehow separate out the integer and probably form a new string variable, but I just don't... (5 Replies)
Discussion started by: jonathanm
5 Replies
8. Shell Programming and Scripting
Hi , i want to Concatenate a string and use the following code
str="i"
str="$str am \n"
str="$str a \n"
str="$str boy \n"
echo $str
I want to ouput this
i
am
a
boy
However it outputs
i am \n a \n boy \n (3 Replies)
Discussion started by: youareapkman
3 Replies
9. UNIX for Advanced & Expert Users
no problem (6 Replies)
Discussion started by: angelina
6 Replies
10. Solaris
Hi,
I downloaded the latest sparc ver of sol10, tried to concatenate the files and encounter error: Not enough space on the disk. Tried from both sol10 x86 and winxp.
command used:
UNIX: cat file1 file2 file3 file4 file5 > file.iso
DOS: copy /b file1 + file2 + file3 + file4 + file5 file.iso... (3 Replies)
Discussion started by: maag
3 Replies