10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
2. Shell Programming and Scripting
hello,
suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly.
example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly.
enter your name:
donald duck (this is of 11 bytes)
expected is as below - display 11... (3 Replies)
Discussion started by: shravan.300
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
I have a query:
I have a bunch of files starting letter with 'a'
(example: abhi,all,anand,animal,a1.txt,allow.java,a*)
here i want to delete/remove only a* folder but not other files and folders. and a* folder is present in so many other folders.
what is unix command to delete... (9 Replies)
Discussion started by: rajanikanth86
9 Replies
4. UNIX for Dummies Questions & Answers
Hello guys. I really hope someone will help me with this one..
So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies
5. Programming
Hi,
If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script.
dd bs=1024 count=3 if=/src of=/dest
But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Discussion started by: royalibrahim
3 Replies
6. Shell Programming and Scripting
Hi
I need a perl onliner to delete a line in a file starting with few words.
Example
file.txt
----------
my name is don
I live in London
I am woking as engineer
I want to delete a line starting with 'I live in' using perl oneliner and in place edit with out temporary files
Thanks... (2 Replies)
Discussion started by: ammu
2 Replies
7. Shell Programming and Scripting
Hi all,
Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this?
Your help is greatly appreciated!!
Best Regards,
Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies
8. Shell Programming and Scripting
I want to delete initial N bytes of a file using sed.
How can I do that? (3 Replies)
Discussion started by: jockey007
3 Replies
9. Shell Programming and Scripting
Hi There!
My final task for today is to delete lines starting with certain numbers
for e.g., my text block is
and i want to delete all lines starting with 11 or 17 or 21
I know i can use multiple sed commands like
sed '/^11,/d' <filename>
sed '/^17,/d' <filename>
sed '/^21,/d'... (2 Replies)
Discussion started by: orno
2 Replies
10. Shell Programming and Scripting
I'm doing a bit of hex editing with dd and I can replace values fairly simply. However, I've run across a situation where I need to delete bytes in the file and I'm not sure how to do that. For example:
Input file has:
1234567890
Output needs to be:
123abc90
I tried this:
printf... (6 Replies)
Discussion started by: Loriel
6 Replies