10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write sed code where it will look through the text for lines with specific expression "Started by user" and when found, will also add the following line, and also lines with another expression "Finished:"
sed -n '/Started by user/, +1p, /Finished:/'... (4 Replies)
Discussion started by: dlesny
2. Shell Programming and Scripting
I have more than 1000 lines in text file which needs to be converted as UPPERCASE by adding _
Thanks in... (4 Replies)
Discussion started by: baluchen
3. UNIX for Advanced & Expert Users
Could you please advise how can one extract from the output of
find . -name "*.c" -print
only filenames in the current direcotry and not in its subdirectories?
I tried using (on Linux x86_64)
find . -name "*.c" -prune
but it is not giving correct output.
Whereas I am getting... (9 Replies)
Discussion started by: tinku981
4. Shell Programming and Scripting
Guys, need help.
I have a file that contains something like this:
I want to print the first and last line of the file and the output should be in a single line.
so, output should be like this:
abc jkl (3 Replies)
Discussion started by: solidhelix08
5. Shell Programming and Scripting
For reference i am still a newb at scripting, but i have what i think is a complex issue.
I need to run a FIND on / to identify all files and print them to >> $TEMPFILE
I need to avoid MVFS
I need to avoid /var/tmp/nastmp/
I was trying find / \( -type d -name nastmp -prune \) -a \( -fstype... (4 Replies)
Discussion started by: nitrobass24
I am trying to do a simple script (shell or perl) for a bioinformatic problem, where I want to use a list from file2 and append this information to file1 (output).
>Apple1 ... (2 Replies)
Discussion started by: herasj01
7. UNIX for Dummies Questions & Answers
I need help with using grep and regular expressions....
I have a long list of about 1000 lines of Chinese flashcards. Here's a small excerpt:
意文 yìwén (given name)
貴姓 guìxìng (honorable surname)
貴 guì (honorable)
姓 xìng (one's surname is; to be surnamed; surname)
呢 ne (interrogative... (2 Replies)
Discussion started by: arduino411
8. Shell Programming and Scripting
I have this regular expression:
And I have this peace of text on a FILE
<book bookid="3" title="the title 3" remaining = "50" price="100">
<reader... (1 Reply)
Discussion started by: dirdamalah
9. Shell Programming and Scripting
I need to do an exact find and replace (I don't want to use regular expressions because the input comes from user). I want to find a line that matches the user's input text and replace it with an empty string.
For example, let's say the user enters I love "Unix" and the contents of the... (2 Replies)
Discussion started by: srikanths
10. Shell Programming and Scripting
Hi, I am trying something like this: Let's say I have a file called File1 with contents:
I have another file, File2, with contents:
(nothing after "="). What I want to do is get the value of x in File1 and set it to xx in File2, i.e., xx=-0.3. And the... (3 Replies)
Discussion started by: ommatidia