cfdf515228
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | source_repo | source_license | source_file | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| convert_text_case | function | bash | shell | 1.0.0 | impure | convert_text_case(mode: string, file: string, [output_file: string]) -> void | Convierte el contenido de un archivo de texto. Modos: upper (todo mayúsculas), lower (todo minúsculas), lf (normaliza saltos de línea a LF eliminando \r), crlf (normaliza saltos a CRLF). Sin output_file imprime a stdout. |
|
false | error_go_core |
|
texto convertido a stdout o escrito en output_file; exit code 1 si el modo o archivo son inválidos | false | bash/functions/shell/convert_text_case.sh | https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git | MIT | scripts/linux/conversores/conversor_texto.sh |
Ejemplo
source bash/functions/shell/convert_text_case.sh
# Convertir a mayúsculas y mostrar en stdout
convert_text_case upper mi_archivo.txt
# Convertir a minúsculas y guardar en archivo
convert_text_case lower input.txt output_lower.txt
# Normalizar saltos de línea CRLF a LF
convert_text_case lf archivo_windows.txt archivo_unix.txt
# Añadir CRLF (para Windows)
convert_text_case crlf unix.txt windows.txt
Notas
Usa awk para las conversiones de case (portable) y sed para los saltos de línea. La función no modifica el archivo original si se provee output_file. Sin output_file imprime directamente a stdout, útil para pipes.