Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Gawk Script in Windows batch file - Help Post 302487457 by Leo Gutierrez on Wednesday 12th of January 2011 02:16:54 PM
Old 01-12-2011
Code:
@echo off
for /f "tokens=2 delims=:" %%_ in (' 
	^(
		echo 3^,3l
		echo e
	^) ^| edlin /b FILEIN.TXT
') do (
	echo %%_ > OUT.TXT
	)
exit /b 0

Code:
C:\>type FILEIN.TXT
Dan
Brown
El
Simbolo
Perdido

C:\>code.bat

C:\>type OUT.TXT
 El

C:\>

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I run scripts in my unix account from batch file in Windows?

Hi all, I'm working on Windows, connecting to my Unix account by different ways: by FTP opening files in UltraEdit32, by mapping drive to browse, by Exceed or Telnet to compile at Unix account. Actually, that is what I would like to change: I'd like to make a batch file which would connect to... (7 Replies)
Discussion started by: olgafb
7 Replies

2. Shell Programming and Scripting

how to convert unix .ksh script to windows .batch script

I am using awk in my .ksh script but when I am trying to run in windows its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like. thanx. #!/bin/ksh egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies

3. UNIX for Dummies Questions & Answers

backup through batch file in windows

Hi, I would like to backup particular files from unix to windows for every day through ftp to my desktop. For that anyone tell me syntax for create batch file in windows. Regards, Arulkumar (0 Replies)
Discussion started by: arulkumar
0 Replies

4. Shell Programming and Scripting

Executing Windows batch file from UNIX

Hi everyone, let me get straight to the points. My manager wants to execute a remote batch file (on a Windows server) from a UNIX Machine, does anyone know if this is possible and what packages would be needed? Thanks p.s. Sorry i cant give OS specifics, we use most UNIX's; AIX, Solaris,... (5 Replies)
Discussion started by: flip387
5 Replies

5. Shell Programming and Scripting

Change the Windows Batch script to UNIX shell script.

Hi, When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script... Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies

6. Windows & DOS: Issues & Discussions

Check the file size using Batch script in windows

Hi, I need to check the file size using a batch script. Pls advise. (0 Replies)
Discussion started by: krackjack
0 Replies

7. Windows & DOS: Issues & Discussions

How to start a vbs from a windows batch file?

Morning, I'm trying to execute a vbs from a .bat file. Can someone tell me what the difference is between these statements: start c:\lib\runit.vbc c:\lib\runit.vbs When I run the batch with the 'start' parameter it doesn't seem to do anything. (1 Reply)
Discussion started by: Grueben
1 Replies

8. Shell Programming and Scripting

Windows Batch script for Unix commands

I wish to create a folder on a unix server B from my windows box using windows batch script. Below is my windows batch script. @ ECHO OFF ::Enter your Directory name: echo Enter your Directory name: set /p mydir= plink user1@ServerA mkdir %mydir% At plink command i get logged... (7 Replies)
Discussion started by: mohtashims
7 Replies

9. Shell Programming and Scripting

To run a shell script in remote server from windows batch file

Hi all, i need to run a shell script on remote server. I have created file .bat file in windows server with following code, c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh i need to run the script.sh in my remote server Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies

10. Shell Programming and Scripting

Windows batch script to Shell script

Hi everyone, I've below windows batch script which is used to filter the file contents line by line and assign the matched values to the variables in for loop. for /F "tokens=1,3 delims=:" %%A in (%LOG_DIR%\PM_IS_workflow_status.log) do ( set "ATTR_NAME=%%A" if /i "!ATTR_NAME!" EQU "Folder"... (1 Reply)
Discussion started by: Kathraji
1 Replies
LCP_CRTPOL2(8)							   User Manuals 						    LCP_CRTPOL2(8)

NAME
lcp_crtpol2 - create an Intel(R) TXT policy (and policy data file) SYNOPSIS
lcp_crtpol2 COMMAND [OPTION] DESCRIPTION
lcp_crtpol2 is used to create an Intel(R) TXT policy (and policy data file) for platforms produced after 2008. OPTIONS
--create Create an TXT policy. The following options are available: --type any|list type --pol file policy file [--ver version] version [--minver ver] SINITMinVersion [--rev ctr1,ctrN] revocation values (comma separated, no spaces) [--ctrl pol-ctrl] policy control [--data file] policy data file [file]... policy list files --show Show the content of policy file or policy data file. Available options are: [--brief] breif format output [policy-file] policy file [policy-data-file] policy data file --help Print out the help message. --verbose Enable verbose output; can be specified with any command. EXAMPLES
Assuming a policy list file list-unsig.lst has been created by the command lcp_crtpolist(8). The following example will create a policy and policy data file. lcp_crtpol2 --create --type list --pol list.pol --data list.data list-unsig.lst SEE ALSO
lcp_crtpol(8), lcp_mlehash(8), lcp_crtpolelt(8), lcp_crtpollist(8). tboot 2011-12-31 LCP_CRTPOL2(8)
All times are GMT -4. The time now is 04:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy