Creating a new file that is composed of other contents

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions Creating a new file that is composed of other contents
Prev   Next
# 1  
Old 10-14-2009
Creating a new file that is composed of other contents

Use and complete the template provided. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:
Write a single command to create a new file composed of the contents of War followed by the the contents of Peace; the new file should be located in the john directory, named wheels. I have to start in the Paul directory which is ../john away, the two files I have to put in the new file are in the john directory

The john and paul directorys are both subdirectorys of the home directory


2. Relevant commands, code, scripts, algorithms:

touch

3. The attempts at a solution (include all code and scripts):
touch ../john < war < peace wheels


4. School (University) and Course Number:UWM Intro to unix

---------- Post updated at 11:50 PM ---------- Previous update was at 07:25 PM ----------

anyone please?

Last edited by jorogon0099; 10-13-2009 at 11:53 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Output file name and file contents of multiple files to a single file

I am trying to consolidate multiple information files (<hostname>.Linux.nfslist) into one file so that I can import it into Excel. I can get the file contents with cat *Linux.nfslist >> nfslist.txt. I need each line prefaced with the hostname. I am unsure how to do this. --- Post updated at... (5 Replies)
Discussion started by: Kentlee65
5 Replies

2. Shell Programming and Scripting

ksh Script, Reading A File, Grepping A File Contents In Another File

So I'm stumped. First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes. I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies

3. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies

4. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

5. Shell Programming and Scripting

Replace partial contents of file with contents read from other file

Hi, I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file. i am able to... (2 Replies)
Discussion started by: seeki
2 Replies

6. Shell Programming and Scripting

I want to delete the contents of a file which are matching with contents of other file

Hi, I want to delete the contents of a file which are matching with contents of other file in shell scripting. Ex. file1 sheel,sumit,1,2,3,4,5,6,7,8 sumit,rana,2,3,4,5,6,7,8,9 grade,pass,2,3,4,5,6,232,1,1 name,sur,33,1,4,12,3,5,6,8 sheel,pass,2,3,4,5,6,232,1,1 File2... (3 Replies)
Discussion started by: ranasheel2000
3 Replies

7. Shell Programming and Scripting

Perl help: Creating a multidimensional array of subdirectories and its contents

I'm currently working with dozens of FASTA files, and I'm tired of having to manually change the filename in my Perl script. I'm trying to write a simple Perl script that'll create a 2-dimensional array containing the name of the folders and its contents. For example, I would like the output... (6 Replies)
Discussion started by: shwang3
6 Replies

8. UNIX for Dummies Questions & Answers

compare 2 file contents , if same delete 2nd file contents

Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents..... I try with "diff"...... but confusion how to use "diff" with if ---else Thanking you (5 Replies)
Discussion started by: krishnampkkm
5 Replies

9. Shell Programming and Scripting

Creating file contents using contents of another file

Hi, I am not sure how to start doing this so I hope to get some advice as to how to start. I have 2 files. The source file contains data that I needed is in columns delimited by ";". For example, in this format: "CONTINENT","COUNTRY","CITY","ID" "asia","japan","tokyo","123"... (21 Replies)
Discussion started by: ReV
21 Replies
Login or Register to Ask a Question
XmbLookupString()														 XmbLookupString()

Name
  XmbLookupString - obtain composed multi-byte input from an input method.

Synopsis
  int XmbLookupString(ic, event, buffer_return, bytes_buffer, keysym_return, status_return)
	XIC ic;
	XKeyPressedEvent *event;
	char *buffer_return;
	int bytes_buffer;
	KeySym *keysym_return;
	Status *status_return;

Arguments
  ic	      Specifies the input context.

  event       Specifies the keypress event to be used.

  buffer_return
	      Returns a multibyte string (if any) from the input method.

  bytes_buffer
	      Specifies the number of bytes in the return buffer.

  keysym_return
	      Returns the KeySym computed from the event if this argument is not NULL.

  status_return
	      Returns a value indicating what kind of data is returned.

Returns
  Number of characters in the string in bytes_buffer.

Availability
  Release 5 and later.

Description
  XmbLookupString()  passes a KeyPress event to an input context, returns composed text in the encoding of the locale of the input context if
  any is ready, and may return a keysym corresponding to the KeyPress event as well.

  There are several possible results of a call to XmbLookupString(), and a client should check the value returned in the status_return	argu-
  ment to determine which has occurred.  The possible values are:

  XBufferOverflow
	    The input string to be returned is too large for the supplied buffer_return.  The required size in bytes is returned as the value
	    of the function, and the contents of buffer_return and keysym_return are not modified.  The client should  re-call	the  function
	    with the same event and a buffer of adequate size in order to obtain the string.

  XLookupNone
	    No consistent input has been composed so far.  The contents of buffer_return and keysym_return are not modified, and the function
	    returns zero.

  XLookupChars
	    Some input characters have been composed.  They are placed in the buffer_return argument, and the string length  is  returned  as
	    the  value	of  the function.  The string is encoded in the locale bound to the input context.  The contents of the keysym_return
	    argument is not modified.

  XLookupKeySym
	    A KeySym has been returned instead of a string and is returned in keysym_return.  The contents of the buffer_return  argument  is
	    not modified, and the function returns zero.

  XLookupBoth
	    Both a KeySym and a string are returned; XLookupChars and XLookupKeySym occur simultaneously.

  When	XmbLookupString() returns a string, the return value of the function is the length in bytes of that string.  The returned string is a
  multi-byte string in the encoding of the locale of the input context.  If that encoding is state-dependent, the string begins in  the  ini-
  tial state of the encoding.

  When	both a keysym and a string are returned, the string does not necessarily correspond to the keysym.  An application that is not inter-
  ested in return keysyms can pass a NULL keysym_return.

  Note that only KeyPress events should be passed to XmbLookupString().  When KeyRelease events are passed, the resulting behavior  is	unde-
  fined.   It does not make any difference if the input context passed as an argument to XmbLookupString() is the one currently in possession
  of the focus or not.	Input may have been composed within an input context before it lost the focus, and that input may be returned on sub-
  sequent calls to XmbLookupString() even though it no longer has any more keyboard focus.

See Also
  XLookupKeysym(), XwcLookupString().

Xlib - Internationalized Text Input												 XmbLookupString()