Sponsored Content
Top Forums Shell Programming and Scripting Execute unix shell script to text file using the script Post 302423453 by posix on Friday 21st of May 2010 05:14:40 AM
Old 05-21-2010
try the simple script to create a file name text_file .
Code:
#!/bin/sh  
  cat >text_file.txt <<EOF
  this is the text file
  thank u
  EOF

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute a .sql file with shell script

hi everybody... can anyone help me in executing the .sql file with shell scripting.... thanx in advance (2 Replies)
Discussion started by: abuanas
2 Replies

2. Shell Programming and Scripting

Execute .dat file from a shell script

Hi, I have a .dat file in my home directory of UNIX. I want this file to be executed by a shell script. Please help me out a.s.a.p (2 Replies)
Discussion started by: user9526
2 Replies

3. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

4. Shell Programming and Scripting

Dos batch script to execute unix shell script

Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh. Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies

5. Shell Programming and Scripting

how to execute a unix shell script from a java program

Hi All, well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this... Please see the below details...and read the details carefully. I have written some code, logic is 1)from... (4 Replies)
Discussion started by: aish11
4 Replies

6. Solaris

how to execute shell script present in unix machine remotely from windows

how to execute shell script present in unix machine remotely from windows? I having a shell script in my unix machine, need to execute the script remotely from my windows machine using Visual Basic or VBA macros. Thanks In Advance. --Suresh (1 Reply)
Discussion started by: sureshmani
1 Replies

7. Shell Programming and Scripting

How to write text file data to excel using UNIX shell script?

Hi All, I have the requirement in unix shell script. I want to write the "ls -ltr" command out put to excel file as below. Input :text file data : drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x 2 apx aim 4096 Nov 29 18:40 drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x... (10 Replies)
Discussion started by: Balasankar
10 Replies

8. Shell Programming and Scripting

Batch script to execute shell script in UNIX server

Hi team, My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server. I have completed the first part i.e From windows to using to unix server with the help of psftp.exe code: psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies

9. Shell Programming and Scripting

Execute a shell script in UNIX server from Cygwin

Hi All, We have shell scripts in UNIX ( Sun OS ) server. Also in my windows machine i have Cygwin installed. Now is there a way to execute Shell script available in UNIX server from Cygwin? (4 Replies)
Discussion started by: Girish19
4 Replies

10. Shell Programming and Scripting

Execute a shell script in UNIX m/c from win 7 using ksh

I need to run a shell script on unix machine from windows 7. I used the "RSH" command in win XP successfully for this, But on win 7 it is not working. Can any body tell me how to run RSH on win 7 or any other command for similar use. I use the command as below rsh <unix m/c> -l <username>... (1 Reply)
Discussion started by: arup1980
1 Replies
FINCORE(1)						    BSD General Commands Manual 						FINCORE(1)

NAME
fincore -- query in-core status of file pages SYNOPSIS
fincore [-qs] file ... DESCRIPTION
The fincore utility queries and displays in-core status of specified files. Note that the result can already be stale when being output due to other activities in the system. Thus it should be used only for advisory purposes. The fincore utility accepts the following options. -q The quiet mode. Outputs nothing unless the file has in-core pages. -s The summary mode. Only shows number of pages. EXAMPLES
The following example shows that /bin/cat and /bin/cp are fully cached in-core while the other executables are not in-core. numbers shown in the default output are page indexes in the file of each in-core pages. % fincore /bin/c* /bin/cat: 0 1 2 3 /bin/chio: /bin/chmod: /bin/cp: 0 1 2 3 4 5 /bin/cpio: /bin/csh: % fincore -s /bin/c* /bin/cat: 4 / 4 in-core pages (100.00%) /bin/chio: 0 / 5 in-core pages (0.00%) /bin/chmod: 0 / 3 in-core pages (0.00%) /bin/cp: 6 / 6 in-core pages (100.00%) /bin/cpio: 0 / 36 in-core pages (0.00%) /bin/csh: 0 / 41 in-core pages (0.00%) SEE ALSO
mincore(2) AUTHORS
The fincore utility is written by YAMAMOTO Takashi. CAVEATS
The concept of page cache is an implementation detail of the kernel. The fincore utility works using some assumptions on the current imple- mentation. Thus it might stop working in a future version of NetBSD. BUGS
The amount of CPU time the current implementation of fincore utility would take is roughly proportional to the file sizes. Ideally it should be proportional to the number of in-core pages. BSD
January 5, 2012 BSD
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy