Hi,
I need to split the fields in some text strings into separate variables.
The fields are separated by pipes.
The strings look roughly like this:
CUSTNAME|hostname|userid|gecos field|staff|disabled||SUDO
Currently I can do it using something like cut -d"|" -f1, but when I put that into... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT MOJAVE
tk_getstring
getstring(n) A dialog which prompts for a string input getstring(n)
__________________________________________________________________________________________________________________________________________________NAME
getstring - A string dialog
SYNOPSIS
package require Tcl 8.4
package require getstring ?0.1?
::getstring::tk_getString pathName variable text ?options?
_________________________________________________________________DESCRIPTION
This package provides a dialog which consists of an Entry, OK, and Cancel buttons.
::getstring::tk_getString pathName variable text ?options?
Creates a dialog which prompts the user with text to input a text string. The contents of the entry are put in the variable upon
closure of the dialog. The command returns a boolean indicating if the user pressed OK or not. If -geometry is not specified, the
dialog is centered in its parent toplevel unless its parent is . in which case the dialog is centered in the screen. Options:
-title -allowempty a boolean argument indicating if the dialog should accept an empty entry -entryoptions simply passes its argu-
ments through to the entry widget. This is valuble for performing extra validation using the Entry widget validation hooks. -geome-
try specifies the geometry of the window
EXAMPLE
package require getstring
namespace import getstring::*
if {[tk_getString .gs text "Feed me a string please:"]} {
puts "user entered: $text"
}
KEYWORDS
dialog, entry, string
getstring 0.1 getstring(n)