1,891 Topics
| |
Hi all, I have two files namely a.txt b.txt a.txt contains 100 records and b.txt contains 9 records.These 9 records in b.txt is also present in a.txt.So,I need a script that compares these two files and outputs the unique 91 records alone in another file. Thanks to all in advance!!!! … | |
Hi I want to resize all my photos but there are so many subfolders too and every subfolder contents JPG files. Now, I want to resize all my main and sub folder's JPG files with HIGEST CLEARITY. I know that there is "convert" command but it only do inside one … | |
Hi, I have a requirement where I have to identify duplicates from a file based on the first 6 chars (It is fixed width file of 12 chars length) and whenever a duplicate row is found, its original and duplicate row's last 2 chars should be updated to all 0's … | |
[COLOR=DarkSlateBlue]Hi all, Problem: Send mail is configured in my system and now i want to write a shell script using which i can send mail to my rediffmail account. Its little urgent & i will be very thankful if someone send me the code. regards, Sanjeev Kumar(sanju456@rediffmail.com)[/COLOR] | |
what command to use if i want to use both "from:" & "To:" field in same e-mail in Linux mail() supports subject , not "from" Sendmail() supports "from", not "subject" regards Mayank | |
For a shell script used to automatically generate c++ code files, I have to split certain names apart for them to be formatted. I split them at a capital letter, but I do not want to split if there are multiple capital letters in sequence. For example: I want this … | |
Got this error while trying to compile the code below: "Floating point exception" [code] #Create a simulator object set ns [new Simulator] #Open the nam trace file set nf [open out.nam w] $ns namtrace-all $nf #Define a 'finish' procedure proc finish {} { global ns nf $ns flush-trace #Close the … | |
I currently use this message to send e-mails in a script but I would also like to save the output of this code to a file as well while preserving the variables. What's the easiest way to accomplish this? when=`/bin/date` /usr/sbin/sendmail -t >2 <<-EOM Subject:User access disabled. From:testuser@test.com To:$EMAIL User … | |
A script I am writing on works on the DVD present in the drive at time of script execution. I want to extract merely the label of whatever appears after '/media/'; ./script.sh /media/DVDRW-43/ An obvious solution would be to get the substring by `path='echo ${file:7:9}' #renders DVDRW-43` but I would … | |
I am using Awk inside a bash shell script to search header files for c++ functions so I can add these functions to another file. All of the functions I need will have form: type getName() or type setName(type value) Right now I get all the functions listed in between … | |
I am designing a text translator in which I have to replace a array of string to another string : Illustration: cmptr is an elctrnc mchn It should be translated to : computer is an electronic machine. (Irrespective of the case-senitivity) Can anyone help me? | |
Hi, I am trying to write a Bash Script to sort some images but I am new to Bash and not having any luck. I have a folder of images. Example: P100.jpg P172.jpg P342.jpg P400.png I need to change these filenames to <filename>_DEFAULT<extension>. ie. P100_DEFAULT.jpg and then move the file … | |
I have a command lline script that works perfectly. cat <some_filename> | awk '$9 == 200' | awk '$10 == 10623720' | awk -F\" '{print $6}' | sort | uniq -c | sort -r I want to put this in a shell script so that we do this for multiple … | |
CONFIG_FILE="${HOME}/sample/seq.cfg" count=`awk 'END {print NR}' $CONFIG_FILE` echo $count t=1 while [ "$t" -le "$count" ] do output_var=`awk -v v1=$t '$1 ~ /v1/ { print $1 }' $CONFIG_FILE` input_var=`awk -v v1=$t '$1 ~ /v1/ { print $3 }' $CONFIG_FILE` echo "O=" $output_var echo "I=" $input_var done the above code is giving … | |
I need a simple script to echo current date 600 times once every second redirect it to a text file and follow the file as it grows using a tail command. | |
-53 45 -54 43 -55 42 -56 41 -57 40 -59 37 -61 35 -61 36 -62 34 -64 33 -65 31 -65 32 -67 30 -68 29 -69 28 -72 25 -73 23 -73 24 -74 22 -76 20 -76 22 -78 20 -79 18 -80 17 -81 16 … | |
Hi all I have a little problem with bourne shell. I've just started writing that kind of scripts I have to write a script that search in folder for header.txt, footer. and content.txt. If these files exists i have to copy the content from them (ignoring the lines with #) … | |
i wanna ask how to read from a file and give a summery of letter count (separate small than capital letters),number of line ,number of paragraphs,number of quoted sentenses ? i know the number of lines by (wc -l) but the others i woundered about !! hope somebody teach me … | |
I want to output results from a postgresql table into a csv file. I can do this however its also copying over headers and a row count. Im using \o /path then my sql query; Is there a way to get rid of the headers so i just have the … | |
haven't been using linux for a while. remember I used to do search and replace all the time with :s/searchString/replaceString/g now I have "pattern not found: " even though pattern I was trying to search/replace was definitly there. any idea? did i forget anything? | |
Hi, I am trying to write a Bash Script to sort some images but I am new to Bash and not having any luck. I have a folder of images. Example: P100.jpg P172.jpg P342.jpg P400.png I need to change these filenames to <filename>_DEFAULT<extension>. ie. P100_DEFAULT.jpg and then move the file … | |
I'm baffled by something in a small script I wrote. The purpose of the script is to compare 2 files on a system. Somehow a tree structure was copied and am fairly certain that the files are identical The command line is as follows: /filecomp.sh /home/daniel/Documents/workspace/www/ This is the script: … | |
Hello, I need to seperate multiple domains by having and not having A records. I have created a shell script like below, but it is not working, as the $? is same (0) for both the dig commands that have and not have A records. ************************* #!/bin/bash for dom in … | |
I hope someone can give me some insight into a problem I had. I coded a KORN shell script to read files and change data in them. I read a list of files from a file using a while read. then unzipped the file read each record in a while … | |
I am trying to write a script that will facilitate cataloguing various files on a backup medium. Looking at what's available, only **stat** seems suitable but it outputs the data with a lot of formatting I don't require and would take a lot of scripting to massage into what I … | |
I am trying to run chekstyle on all of my files within a project. So I have model, view, and controller folders all with their subfolders of .h and .cpp files. Is there any way to grab all the files that end in .h or .cpp without having to individually … | |
Hey everyone, I'm pretty unexperienced when it comes to SHELL scripting, and I'm having some issues with something. I'm trying to use a command that lists files within a directory with names that start with “t” or “f” and end with “3” or “2”. After that I will need to … | |
I am new to Powershell and I am trying to get an understanding of it through borrowing script and making it work for my system. I have a script that I thought would take files from a target folder and zip them into a destination folder. It is creating zip … | |
New to bash, I am trying to change the names of dozens of files as I switch over to Linux. I need something that will work recursively from the root of a directory. In my research I found something like this that I have adapted: find /media/D_Drive/Music/ -name '*&*.*' -exec … | |
I am looking for syntax I saw somewhere but can not find now. Working with the results of a find delete the files found. The syntax is something like this: for i in "${find . -name '*.ini'}"; do rm $i; done Am I dreaming or is this possible? |
The End.