Question

I need some help with Linux I want to delete the line by using sed: echo...

I need some help with Linux

I want to delete the line by using sed:

echo 'abc123@email.com' | sed '/\S\@\S\.\S/d'

this command does not work. What is the problem?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Using this command , It should work

echo 'abc123@email.com' | sed 's/[a-zA-Z0-9@.]//g'

The above command will delete @. and all alphanumeric character

Thanks, PLEASE COMMENT if there is any concern.

Add a comment
Know the answer?
Add Answer to:
I need some help with Linux I want to delete the line by using sed: echo...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I am in need of some help with UNIX/Linux, particularly sed and awk: Please help me...

    I am in need of some help with UNIX/Linux, particularly sed and awk: Please help me Display from /etc/passwd a list of users and their shells for those using the Korn shell or Bash shell. Order the output by the absolute pathname of the shell used. Thank you.

  • 1) Which sed command line string will delete any line that begins with the string 'directory'...

    1) Which sed command line string will delete any line that begins with the string 'directory' within the file called sedfile. A) sed '/dir/d' sedfile B) sed '/^dir/d' sedfile C) sed 's/^dir/d' sedfile D) sed '/directory/d' sedfile 2) Complete the sed commmand string below. Create a sed command line string that will replace ALL the occurrences of X and x with s within the file called sedfile. sed 's/##/s/g' sedfile Replace the ## with the BEST correct answer. A) [X,x]...

  • I need some help with the cp command in Unix/Linux. I need to copy all the...

    I need some help with the cp command in Unix/Linux. I need to copy all the files in my current directory A03 into the backup directory. How do I do this? I am taking an introductory unix/linux course so I need a basic answer. Thanks.

  • UNIX/LINUX Help. I need to modify this script so that the output of the file name...

    UNIX/LINUX Help. I need to modify this script so that the output of the file name is changed from you_someAssignment.txt to You.someAssignment.txt. #!/bin/sh if [ $# -eq 1 ]; then STUDENTNAME=$USER ASSIGNMENT=$1 else echo "usage: `basename $0` [assignment]" exit 1 fi if [ ! -d "$ASSIGNMENT" ]; then # Control will enter here if $ASSIGNMENT doesn't exist. mkdir $ASSIGNMENT fi # Move into the directory cd $ASSIGNMENT # Variable for the filename FILENAME=$USER\_$ASSIGNMENT.txt HOST=$(hostname) DATE=$(date +"%m-%d-%Y") TIME=$(date +"%r") if [...

  • I am taking an introductory course in unix/linux shell programming and need some help. Can you...

    I am taking an introductory course in unix/linux shell programming and need some help. Can you tell me what command I would use to make the variable myName readable by child process

  • I am a college student taking an INTRODUCTORY linux shell programming course and need some help...

    I am a college student taking an INTRODUCTORY linux shell programming course and need some help with writing a for statement. How would I write a for statement to process all the arguments at the command line and indicate if the argument contains the name of a student in my class. The names of the students are in the file cis132students.   I realize you do not have the file but if you could write it I could see if it...

  • Some multiple choice questions of Computer Science: Linux command; Actually I can google it but the...

    Some multiple choice questions of Computer Science: Linux command; Actually I can google it but the choice here is a little..unclear. So I can't make sure..Thank you! 1:What does the Linux command “cat” do? a. copy the contents of a file to the screen b. count the number of characters in a file c. create a Linux catalog d. open up an edit session allowing you to modify a file 2:Which of the following Linux commands is best for getting...

  • Hello I need help creating a bash script for linux as shown below getting the information...

    Hello I need help creating a bash script for linux as shown below getting the information from ifconfig The script must programmatically gather and output the informationEXACTLY AS SHOWN BELOW and (not echo this and echo that). ====================================== Interface: AAA MAC Address: BB:BB:BB:BB:BB:BB IP Address: CCC.CCC.CCC.CCC Subnet Mask: DDD.DDD.DDD.DDD Received Bytes: EEEEEE ====================================== Thanks,

  • UNIX?LINUX course. You are working on a documentation file userNotes.txt with some members of your software...

    UNIX?LINUX course. You are working on a documentation file userNotes.txt with some members of your software development team. Just before the file needs to be submitted, you manager tells you that a company standard requires that one blank space be left between the end-of-sentence period (.) and the start of the next sentence. (This rule does not affect sentences at the very end of a line.) For example, this is OK: Turn the knob. Push the “on” button. This is...

  • I am a college student taking an intro to linux shell programming course and need some...

    I am a college student taking an intro to linux shell programming course and need some help with this question. I need to write an until statement as indicated: Check to see if the file cis132 exists in the current directory. If it does not a message will be printed every 10 seconds indicating that file does not exist. Once the file is created the message will stop. Thanks for your help.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT