9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I wish to rename all files ending in .txt by removing .tex.
Currently I have
me@me-Inspiron-518:~$ ls
a.tex.txt bin b.tex.txt c.tex.txt Desktop Documents Downloads d.tex.txt Music Pictures Public Templates VideosDesired outcome
me@me-Inspiron-518:~$ ls
a.txt ... (2 Replies)
Discussion started by: Xubuntu56
2 Replies
2. Shell Programming and Scripting
Hello Experts,
I am trying to write a shell script to find duplicate items in an array, this is what i have tried :
#!/bin/bash
echo "This is another sample Progg to remove duplicate items from an array"
echo "How many number do you want to insert"
read n
for (( i=0; i<$n; i++ ))
do
... (5 Replies)
Discussion started by: mukulverma2408
5 Replies
3. Shell Programming and Scripting
I need to create a shell script to delete multiple items (Strings) at a time from a file.
I need to iterate through a list of strings.
My plan is to create an array and then iterate through the array.
My code is not working
#!/bin/bash -x
declare -a array=(one, two, three, four)... (5 Replies)
Discussion started by: bash_in_my_head
5 Replies
4. Shell Programming and Scripting
I have one master file "File1" with all such info in it. I need to grep each object under each list from another file "File2". Can anyone help me with a script for this.
File 1
------
List 1
Object 1
Object 2
List 2
Object 3
Object 1
List 3
Object 2
... (5 Replies)
Discussion started by: Sam R
5 Replies
5. Programming
Hi everyone! So I have a listView on my Form named "officeView" I already have the code to add and update info into it, but Im having troubles deleting items out of it. :/
Now I know how to delete an Item from the listView, but I want the item before the deleted item to become automatically... (0 Replies)
Discussion started by: romeo5577
0 Replies
6. Shell Programming and Scripting
I have a need to compare 2 files, then print results to file. Need to find items from file2 that are not found in file 1. thanks in advance!
example:
file 1:
abcde=12
fffff=6
bbbb=35
file2:
abcde=12
fffff=6
bbbb=35
ccccc=10
kkkkk=45 (8 Replies)
Discussion started by: discostu
8 Replies
7. Shell Programming and Scripting
Hi,
i need a script, which deletes doulbe items in a file.
My file looks like:
-
-
-
xxx
xxx
G123
G234
G234
G234
o
o
...
First i want to sort the file an then i want to delete double items.
Can anyone help me. I work under solaris10. (3 Replies)
Discussion started by: free2k
3 Replies
8. Shell Programming and Scripting
OS=HP-UX ksh
The following works, except I want to include the <start> and <end> in the output.
awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log'
The following work in bash but not in ksh
sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Discussion started by: Ikon
4 Replies
9. Shell Programming and Scripting
AWK help:
I have a file with following format. I need to remove any entries which are repeated based on first 3 characters. So from the following files I need to remove any entries start with "mas".
mas01bct
mas02bct
mas03bct
mas01bct
mas01bct
mas01bct
mas11bct
mas01bct
mas01bct... (11 Replies)
Discussion started by: amir07
11 Replies