Sponsored Content
Top Forums Shell Programming and Scripting Builtin alternatives for several commands? Post 302945489 by Michael Stora on Friday 29th of May 2015 05:59:09 PM
Old 05-29-2015
Builtin alternatives for several commands?

I'm adapting a BASH script to run with an absolute minimal amounts of Cygwin64 files so colleagues using Windows can use it without installing Cygwin.
I am down to the following in /bin only (replacing cut with parameter substitution eliminated all needed things in /etc)
Code:
bash.exe
cygattr-1.dll
cygiconv-2.dll
cygintl-8.dll
cygncursesw-10.dll
cygreadline7.dll
cygwin1.dll
cygwin-console-helper.exe (mintty misbehaves without this)
find.exe (using a wildcard, directory type, recursion, and file attribute output so replacement unlikely): $( find "$dataDir" -type d -name '*.aps' -printf '%T@|%p\n' -prune | sort -nr )
ls.exe (expanding * and suppressing whitespace with OFS=$'\n'): $(ls -dr "${apsFolder[$apsIn]}""/Run"*)
mintty.exe (used to support ANSI bold, underline, etc.)
mv.exe (I think I can replace this with a > and then rm): mv "${runFolder[$runIn]}" "${apsFolder[$apsIn]}""/Run""$padded"" - ""$newName"
rename.exe (using * wildcard): rename "$runName" "$newName" "$excelFolder""/"*".csv"
rm.exe: rm "${runFolder[$runIn]}""/comm" &>/dev/null
sed.exe (already planning on replacing with ${var/Pattern/Replacement})
sort.exe: $( find "$dataDir" -type d -name '*.aps' -printf '%T@|%p\n' -prune | sort -nr )
stat.exe: dateStamp=$(stat -c '%y' "$i") (keep in mind these are windows files either on the users hard drive or a windows share)

Any low handing fruit? No need to write the code for me just point me in the right direction.

Mike

---------- Post updated at 02:59 PM ---------- Previous update was at 02:44 PM ----------

Update: looks like find is (sometimes?) needing something in /etc as well (cant be all the time or I could not have been able to test cut). Any trick to find out what other than trial and error (what I used so far)?

Mike

Last edited by Michael Stora; 05-29-2015 at 08:43 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ASP alternatives

I have just found out that a project I have developed in ASP (ultradev) needs to be migrated to a unix server and won't be able to support asp. Can anyone point me in the right direction to see what my options are with Unix? I have never worked with or developed for a Unix box before. Also,... (3 Replies)
Discussion started by: Ricki
3 Replies

2. UNIX for Advanced & Expert Users

Alternatives for CLOCK_MONOTONIC

Hi, I need to develop timeout functionality in my code, which is not affected by system's time changes.Unfortunately I dont have CLOCK_MONOTONIC support in my OS. Are there any alternatives? (3 Replies)
Discussion started by: amitks21
3 Replies

3. Shell Programming and Scripting

The builtin split function in AWK is too slow

I have a text file that contains 4 million lines, each line contains 2 fields(colon as field separator). as shown: 123:444,555,666,777,888,345 233:5444,555,666,777,888,345 623:454,585,664,773,888,345 ...... Here I have to split the second field(can be up to 40,000 fields) by comma into an... (14 Replies)
Discussion started by: kevintse
14 Replies

4. Red Hat

Alternatives for sudo??

I am looking for an alternative for sudo in linux, where i need not type the password. OR is there any other version of 'growisofs', which can be executed under sudo??? As currently 'growisofs' refuses to start under sudo... Thanks in advance (12 Replies)
Discussion started by: sony star
12 Replies

5. UNIX for Dummies Questions & Answers

Unix Builtin commands

Hi, In unix ls command is found in /bin/ls. Similarly where can I find built-in commands like read, set, unset commands. I found in some couple of websites saying found in bash tool set. In unix everything is considered as a type of file with path. Please can anyone tell me where is that Bash... (5 Replies)
Discussion started by: gwgreen1
5 Replies

6. Shell Programming and Scripting

Sed -f alternatives?

I have a list of items (control file) that I want to substitute in a text file, and it's BIG. The file has two items, the original, and the new: A B B C D E The file has something like 10,000 entries. So in the oldfile.txt, I'd like to basically make all these expression matched... (9 Replies)
Discussion started by: twoblink
9 Replies

7. UNIX for Advanced & Expert Users

SSH alternatives

Hi, I am using SSH to execute unix commands on remote machines. But, SSH will be diabled soon and I am looking for other alternatives to execute remote scripts/commands, without SSH . any suggestions or workarounds with out SSH for remote program executions ? Thanks in advance. (4 Replies)
Discussion started by: talashil
4 Replies

8. Shell Programming and Scripting

Alternatives to Expect

Are there any other alternatives to using Expect script? Can functionality provided by Expect be achieved by any other scripting language? (7 Replies)
Discussion started by: indianya
7 Replies

9. UNIX for Dummies Questions & Answers

Find command alternatives

Hi is there an alternative other than the find command to get the size of files which are 10 days older ? I already use a script with find command find . -mtime +10. However would want to have an alternative script to find the size of files which are over 10 days. Let me know if you... (1 Reply)
Discussion started by: venkidhadha
1 Replies

10. UNIX for Dummies Questions & Answers

Typeset builtin error

I'm attempting to emulate another users .zshrc file. However, I'm sort of confused on what exactly the -g argument does for the typeset builtin. Here's what he has in his .zshrc file: typeset -ga sources sources+="$ZSH_CONFIG/environment.zsh" sources+="$ZSH_CONFIG/options.zsh"... (4 Replies)
Discussion started by: brandontdr
4 Replies
ilasm(1)						      General Commands Manual							  ilasm(1)

NAME
ilasm, ilasm2 - Mono IL assembler SYNOPSIS
ilasm [option] [source-files] ilasm2 [option] [source-files] DESCRIPTION
ilasm is the Mono ILAsm assembler. You can pass one or more options to drive the compiler, and a set of source files. Use ilasm to generate 1.0 assemblies and use ilasm2 to assemble programs that use the 2.0 features (generics). The Mono ILAsm assembler accepts options starting with / or - for mosted options. The Mono ILAsm assembler generates images (.exe and .dll files) that contain CIL byte code that can be executed by any system that imple- mented a Common Language Infrastructure virtual machine. OPTIONS
/output:<file_name> Specify the output file name. /exe Generate an exe /dll Generate a library /scan_only Just scan the IL code and display tokens. /show_tokens Show tokens as they are parsed. /show_method_def Display method information when a method is defined. /show_method_ref Display method information when a method is referenced /key:KEYFILE Strongname (sign) the output assembly using the key pair present in the specified strong name key file (snk). A full key pair is required (i.e. delay signing is done using a .publickey directive in the sources). /key:@CONTAINER Strongname (sign) the output assembly using the key pair present in the specified container. --about Display information about ilasm --version Display ilasm version SEE ALSO
mono(1),mcs(1) COPYRIGHT
Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com) MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details. WEB SITE
Visit: http://www.mono-project.com for details ilasm(1)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy