General :: Get Output File From A Master File?

Aug 3, 2010

having following problem in linux environment.I have a following basic file with name " BASEFILE", as shown example below :

sl.no pol.no name status loan
1 123 rama FORCE 500
2 234 jama LAPSE 800

[code]...

View 12 Replies


ADVERTISEMENT

General :: Data From Input File To Be Taken And Send To Output File?

Jul 24, 2010

I am new to shell scripting.What i am trying is to write a shell script which take the input file and output should like as mentioned below.Output file should have data till SOK (marked in red)from every second line and then the selected data(marked in green) from 4th line.So selected data from 2nd and 4th line in one line of O/P file and then similarly selected data from 6th and 8th line in second line of O/P file.Input File:

3c3
< c1111;11.11.11.11;pOK;SOK:abcde;Universe:aa
---

[code]...

View 14 Replies View Related

General :: Script To Ftp A File To Remote Machine - Log The Output To A File?

Feb 5, 2010

I am using below script to ftp a file to remote machine

Code:

#!/bin/bash
ftp -nv <<EOF
open ${SERVER}

[code]....

When I execute the above file its working fine and displaying output on to the screen. How can I log the output to a file?

View 7 Replies View Related

General :: Mapping With Series From Master File And Calculate Count?

Sep 7, 2010

My shell script is calculating the count of each shortcode series wise whose sample output is as follows:

Code:

56882
9124 1
9172 1
9173 4

[code]....

View 1 Replies View Related

General :: File Really Is After The Command 'file' Output "data"?

May 3, 2010

I download some movies those are with 'mkv' , but couldn't be played, I tried other players , like mplayer , dragon , xine, even swich OS to windows , didn't work . not all of those files , but some of them. one of them named 'the.other.man', 2GB.I opened a terminal and executed "file the.other.man.mkv "utput is "data", and command 'strings the.other.man.mkv", output like as follow:

T5}.
S!e
I|

[code]...

View 1 Replies View Related

Ubuntu :: Pdftk Output File With Pages Extracts Same Size As Input File?

Apr 22, 2011

I am curious if perhaps I am doing something wrong extracting pages from a pdf doc using pdftk and creating a new file. I am only extracting the odd pages from the file and outputting them to a new file that is now only 20 pages instead of the input's 40 pages, yet the new output file is still 1.4Mb in size, the same as the original.

It seems strange to extract only half the pages of a large document and end up with a result that is the same size. how to streamline the resulting pdf's using pdftk?

BTW this is the command I am using, in case perhaps I am missing an option to optimize file size or something:

Code:
pdftk A=ch15.pdf cat A1-40odd output odd.pdf

View 1 Replies View Related

Ubuntu :: Error (splicing File: Input / Output) While Copying File

Jun 3, 2010

When I try to copy PDF files from one folder to another folder, it give me this error: "Error while copying "2004-SNUG-Europe-paper_...log_DPI_with_SystemC.pdf". There was an error copying the file into /media/CCDCE66BDCE64F70/Backup Master/Heterogeneous_cosimulation/Documentation" "Error splicing file: Input/output error" What is the reason of this error and how can this be fixed?

View 9 Replies View Related

Ubuntu :: Copying File - Error Reading From File Input/output

Jun 29, 2010

I have a 7.2 GB file (VMWare virtual machine file) that I am trying to copy from its original location to the another folder OR to external hard drive...each time I try to do this, I always get the following error after the copying process reach 'exactly' 1.4 GB

Error reading from file input/output error

And I have to either Cancel or Skip

I've tried to split the files to smaller pieces but the idea didn't work as I still get the same error whenever I try to compress/ split or do any operation with this file. how I can copy this file?

View 2 Replies View Related

Programming :: Variable String File Base - Output File Doest Not Exclude The Values In Grep -av

May 1, 2011

My script.

This is may script:

Code:

Problem: Output file doest not exclude the values in grep -av

View 3 Replies View Related

Programming :: Sed - Save Output To File With Filename From Content Of Another File?

Feb 28, 2011

My employer issues pdf files with everyones work schedules. I copy the content and save it as plain text in a file called unformatted (hope to be able to automate this step someday). Im working on a SED script that reduces unformatted to only display what I want to see and saves the result in a file Iïve named formatted. After that I have to manually copy formatted and save it with that days date as a filename e.g. 2011-02-25 or whatever day is scheduled in the pdf, for use on a mobile device (Nokia N900). I noticed that the date occurs on certain lines in the file so I added a line like:

sed -n 's/^Date: (201[1-9])/([0-1][0-9])/([0-3][0-9]).*/1-2-3/p' < unformatted >theDate
That creates a file theDate with the date in it that I wish to use as the filename for this particular instance. So I would like to skip the file formatted all together and have the sed- script write to a new file using the content of the Date as a filename, but how do I make that happen? And of course it would be more elegant if I could skip the intermediate theDate file as well.

View 4 Replies View Related

Ubuntu :: Corrupt Master File Table?

Jul 22, 2011

On my backup drive I can no longer see any files. According to Testdisk program the master file table (MFT) is bad. How do I restore or rebuild the MFT?

View 3 Replies View Related

Programming :: Substitute Text From Master File?

Mar 29, 2010

i have a PHP program, it encompasses about 200 scripts. Years ago, it was rewritten by another programmer to be multi-lingual, but the multi-lingual attraction of it never took off. Now that I am the only maintainer, trying to reuse what I have for code is quite difficult. If I look at one script, I see items like

_HEADER_TEXT_ERROR_4
_TABLE_ROW_SIZED_FORMAT
_ERROR_SELECT_RADIO_MAIN

All of these (and many more) are found in a "main.php" file that sort of go like this:

DEFINE _HEADER_TEXT_ERROR_4 "You Entered a Bad Value";
DEFINE _TABLE_ROW_SIZED_FORMAT "Last Name";
DEFINE _ERROR_SELECT_RADIO_MAIN "Make Your Selections";

What I would like to do is have something that says FOR all files in this directory, when you find something that starts with _, find that value in main.php and substitue what is inside the quotes for that value. Sort of unwriting all this multi-lingual stuff. I can format how I would do it if it was all stored in MySQL, but doing it from bash has me perplexed.

View 11 Replies View Related

General :: Getting The Name Of The Output File?

Nov 2, 2009

have a doubt, suppose in the script i include an exe type of file for ex. ./a.out, which takes input as a pdb file namely 1sn3.pdb, now i want my output text file to contain the name 1sn3.txt , how do i do that using the shell script

View 8 Replies View Related

Server :: Distribute Securenets File From NIS Master To Slave?

Jan 25, 2011

I have a large environment with many VLANs and NIS slaves serving the VLANs. Previously we have not used a securenets file (don't worry; we don't use NIS for passwords, just NFS maps), but I'd like to start. The number of NIS slaves makes it annoying to update a securenets file on each when we add a new VLAN. Is there a way to propagate the securenets file to each slave when I update it on the master?If not, I guess I can live with propagating the file once and only visiting new slaves when I build them, because in 99% of cases a NIS slave only serves its own subnet.

View 1 Replies View Related

Software :: Postfix - Master Is Dead But Pid File Exists?

Dec 21, 2010

When I check the status of postfix I get this error..... what does it mean and how do I fix / troubleshoot it?

View 11 Replies View Related

General :: Saving Awk Output To File?

Feb 2, 2010

I have a problem with saving output from awk to a file. The commands I tried:

Code:

$ top | awk '/Cpu|Mem/ {if ($1 ~ /Cpu/) {printf strftime("%H:%M:%S")" "; printf strtonum($3)" ";} if ($1 ~ /Mem/) {printf ($5/$3)*100; printf "
";}}' > file.out

and

Code:

$ top | awk '/Cpu|Mem/ {if ($1 ~ /Cpu/) {printf strftime("%H:%M:%S")" "; printf strtonum($3)" ";} if ($1 ~ /Mem/) {printf ($5/$3)*100; printf "
";}}' &> file.out

In both cases file.out is empty. What am I doing wrong?

View 2 Replies View Related

Ubuntu Servers :: Permission Denied Dumping Master File?

Mar 21, 2011

I am attempting to setup an Ubuntu server as a secondary DNS server. It seems whenever it tries to dump the master file the system log shows Permission denied.let me know if more information is needed.NOTE: where it says example.com I have simply removed my actual Domain name.

Mar 21 21:49:24 ulinux named[14418]: zone example.com/IN: Transfer started.
Mar 21 21:49:24 ulinux named[14418]: transfer of 'example.com/IN' from 192.168.0.15#53: connecte$

[code]....

View 1 Replies View Related

General :: How To Print Command Output To A File

Apr 29, 2010

I am creating a script to sync my important documents between two system. I want my script to generate a log file for the last action. can you suggest me a way to achieve this.Question: If I execute the rsync command with -v flag, it will print a lot of messages on the console. Is there any way. So, I can redirect these logs to a file?

View 4 Replies View Related

General :: Redirecting Command Output To File?

Sep 19, 2011

This seems so simple when doing it from command line but I'm not able to accomplish it inside a script. I am trying to put output of following command into a text file:

CMD= mysql -uroot -psecret -e 'SHOW SLAVE STATUS G;'
FIL=~/replication-`date +%F`.txt
MAILTEXT=~/mailtext.txt
touch $FIL
$CMD > $FIL

Where FIL is a variable that contains path of the file to which to output command. I am running this command in a shell script from where I want to email contents of $FIL as attachment using mutt. But I am always getting 0 byte file. Also if I examine in directory the file is of 0 byte length.

View 3 Replies View Related

General :: Restrict Output To Display One File Each?

Jul 27, 2010

I use 'grep -Ri "mypattern" .' to search for all files in the current directory recursively that contain "mypattern". But this command returns every single occurence, so that if a given file has several occurences of the pattern, the screen fills up pretty quick. More than likely, there's a way to restrict the output so that it only displays each file once, no matter how many occurences it contains, but I couldn't find how to do it.

View 2 Replies View Related

General :: How To Redirect The Output To Different Column In .csv File?

Apr 25, 2011

I was trying to redirect the output of two variables to different columns of a .csv file in MS excel like this,

Code:
echo "$a $b" > abc.csv
But I am getting both $a and $b in the same column, is there anything I can use instead of to move the value of $b to the next column? Or is there a good different approach to do it?

View 2 Replies View Related

General :: Output Pid's From Ps To A Comma Delimited File?

Apr 7, 2010

need to monitor pecific processes over a time frame in terms of the amount of memory and cpu usage it utilizes. I can do this using the top -p <pid> option and using ps to retrieve the pid's. However, seeing that the pid's might differ and it needs to be run on about 13 different machines, I would like to write a script for this that can be run at set intervals. My problem that I have is this:

- When running top -p <pid> I can specify a comma seperated list of the processes required to monitor at that specific time.

- I can use ps -ef | grep <process> | grep -v grep| awk '{ print $2 }' to retrive the list of pid's and output this to a file.

However, how can I output these to the file as a comma seperated list without having to manually do this every time? The reason for this is (an example), lets say I want to monitor the cpu and memory usage of postgresql as well as all its child processes, then I would ps grep for postgres and get the list of pid's for instance.This list then needs to be passed to top -p as a comma seperated list of pid's I suspect that awk or sed might have some options available for this but I do not know this well enough.

View 11 Replies View Related

General :: E-Mailing Whole Output Of A File With Crontab

May 3, 2011

I have this code that is 'bashed' regularly with crontab and basically it will send me an E-Mail of most of the output but it misses out some of it!

Here is the crontab code to automatically run the script:

Code:

So that sends me an E-mail with most of the output of the following code:

Code:

It sends me everything up to echo "*******" "Begin compressing and transferring files" "*******" but it wont output the tar bit.. so it should give me a list of files that have been tarred.

View 1 Replies View Related

General :: Send Output To Both The Screen And A Txt File?

Jan 29, 2010

I am currently using this command

Code:

apt-get install samba --force-yes -y > /sambainstall.txt This suppresses the screen output and sends it all to a text file, how do I have both?

View 2 Replies View Related

General :: Check The Output Of Assembly File?

Jan 14, 2011

I have a small doubt regarding Assembly file compilation. I have two .s files. When I compile two .s files I am getting corresponding .o files. But when I compare the both .o files with diff command, it is resulting that two files are differing. How could/ what are commands we should use to understand the difference between two .o file's output.

View 4 Replies View Related

General :: Command To Overwrite File With Sed Output?

Jan 5, 2010

For example I want a file to be processed by sed, and then overwrite the file with sed's output. I would try this:
Code:
sed '<regex goes here>' myfile > myfile
But it doesn't work as expected, instead it empties the file (I am thinking that as the first byte comes out of sed, it overwrites the whole file and sed has nothing more to do). How can I make this work?

View 14 Replies View Related

General :: Meaning Of File Command Output?

Feb 27, 2010

I used the following command

Code:
file /usr/bin/mawk
Output is

[code]...

View 4 Replies View Related

General :: Primitive Way To Output A File To The Printer ?

Jun 13, 2011

What is the most primitive way to output a file to the printer? I mean data transfer from the file to the printer. I suppose it must be 'cp some_file /dev/<printer device>. For the console, I know the devices are /dev/ttyN, N= 1,2,... But I do not know what are the devices for the printer.

View 9 Replies View Related

General :: Parsing Output - End Of File Option ?

Feb 23, 2011

I'm working on a alias/script that will make it easier to look at my environment via the set command.

On my ubunto when running set it also displays some 10 pages of code pertaining to something called "imagemagik". at the end of the output. This code begins with the { character.

This is annoying if I want to look at my environment when working on scripts. How could I use something like grep, awk, sed, or whatever to ignore everything after the "{" character.

That seems to be the simplest way as long as there are no leading brackets in my environment. (And if you're thinking I should just remove {imagemagik}, I might just do that. But I still would like to know how to do this).

View 3 Replies View Related

Software :: ISO Master Warning: Failed To Open Config File For Reading

Jan 10, 2011

OpenSuse 11.2 Downloaded ISO Master 1.3.8 from here: [URL] Opened the Slackware 13.1 ISO within it, tried to modify the Tagfile which resulted in the error:

Quote:

Edit failed, check Options/Editor and running ISO Master from the terminal showed the error in the title of the thread!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved