hi ,
how can i print every character in new line on unix
i want to have abcd like this:
this code didn't worked in my os but worked on linux
best reagard
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 08-08-2016 at 05:38 AM..
Reason: Added CODE tags.
Wouldn't you think, too, that it helped if you told us WHAT your OS is on which that code didn't work? And, what your shell is, because that might offer an easy answer/solution as well...
hi ,
how can i print every character in new line on unix
i want to have abcd like this:
this code didn't worked in my os but worked on linux
best reagard
Moderator's Comments:
Please use CODE tags as required by forum rules!
Hello rezasadeghi,
Please use code tags as per forum rules for your Input_file/code/commands which you are using into your code. Following is the rules link for same, you could go through it once. https://www.unix.com/misc.php?do=cfrules
Coming to your requirement, could you please try following and let us know then. NOTE: As per your Input_file only above command is provided, in case you have other requirements by which above output is not matching to your requirements, then please mention all the details about your requirements along with sample Input_file and expected output too, along with your O.S details etc.
Showing us the exact diagnostics produced by your code when it doesn't work ALWAYS helps get a meaningful answer sooner.
Removing the extraneous unmatched single quote would probably help. Depending on what operating system and version of sed you're using, that might even fix your problem. But, probably not on UnixWare.
Try:
where there is nothing but a <newline> character following the backslash at the end of the 1st line.
NOTE: With the extra single quote before sed in your script I can't believe that that worked on any system. I will not guarantee that the above will work with csh and its derivatives, but it should work with any shell based on Bourne shell syntax.
Last edited by Don Cragun; 08-08-2016 at 05:58 AM..
Reason: Add note.
I have this fastq file:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA
+test-1
GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
here's what im trying to do.
i have a file containing lines similar to this:
data.txt:
1hsRmRsbHRiSFZNTTA1dlEyMWFkbU5wUW5CSlIyeDFTVU5SYjJOSFRuWmpia0ZuWXpKV2FHTnRU
1lKUnpWMldrZFZaMG95V25oYQpSelEyWTBka2QyRklhSHBrUjA1b1kwUkJkd3BOVXpWM1lVaG5k... (5 Replies)
Hi All.
Seeking for your assistance to get all the last 4 characters of each file before "." and put it in the variable
ex.
abcdZWU1501.csv
abcdXYZ1501.csv
abcdEFG1502.csv
abcdHIJ1501.csv
output will be:
1501
1502
What i did was (6 Replies)
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
i need to replace the any special characters with escape characters like below.
test!=123-> test\!\=123
!@#$%^&*()-= to be replaced by
\!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Hi Gurus,
I am trying to execute the below command. However the output shows the value + path of the folder where the command is being executed. But I am only interested in the value but not the path.
du -hs /aps/inf/SeLogs
when I execute the above command, output is
32G... (5 Replies)
I've got a file (numbers.txt) filled with numbers and I want to replace each one of those numbers with a new random number between 0 and 9. This is my script so far:
#!/bin/bash
rand=$(($RANDOM % 9))
sed -i s//$rand/g numbers.txtThe problem that I have is that it replaces each number with just... (2 Replies)
Hi,
I am having a file which contains records as follows:
DETAIL_KEY~12344|ACTIVE_PASSIVE~Y|AVG_SIZE_OF_RESPONSE~123123131
DETAIL_KEY~12344|ACTIVE_PASSIVE~Y|AVG_SIZE_OF_RESPONSE~123123131
DETAIL_KEY~12344|ACTIVE_PASSIVE~Y|AVG_SIZE_OF_RESPONSE~123123131... (4 Replies)
Hi!
I have a file with some characters with accent.
I don't find the solution to translate
ô ö as o
à as a
é è as e
ç as c
With the command tr or sed?
I can't write sed 's/ô/o/g' because the copy/paste ô don't work.
Thanks! (1 Reply)
Is there a way to recursively find scripts/files with ^M characters embedded in them
Usually the case is when a file is saved on unix but in dos/windows format it ends up have ^M characters at the end of each line.
Please let me know if there is a way to recursively find them. (3 Replies)