Sponsored Content
Full Discussion: Script reading needed
Top Forums UNIX for Dummies Questions & Answers Script reading needed Post 302848017 by vbe on Wednesday 28th of August 2013 10:02:28 AM
Old 08-28-2013
Now its indented, is it not more clear?
You tell us what you read and we will correct...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reading Input in a Script

#!/usr/bin/sh echo "Enter reason:" echo "> \c" read $reason $reason >> access.log This doesnt work for me. Can someone tell me how I would read the input from what the person types, and then append that to the log file? Regards (2 Replies)
Discussion started by: alwayslearningunix
2 Replies

2. Programming

Reading a file into a C++ script

Hi, I'm trying to read a file in with and assigne the stream to a char * type. I've manged it using the cin.get returning type char, but am having run-time problems returning a char *. For example, char *pStream = "file.txt"; ifstream from(pStream); from.open(pStream); ... (1 Reply)
Discussion started by: Breen
1 Replies

3. UNIX for Dummies Questions & Answers

script to reading a file

hi, I have a file containing names, say n number of names, sample file robin smith dallas frey cook all these names are in a file name called names.txt and it is placed in a directory called /data/names all i want is to write a script, which will read from the file and gives the... (3 Replies)
Discussion started by: vasikaran
3 Replies

4. Shell Programming and Scripting

URGENT HELP NEEDED ON -File size reading

All Expert, I am using Sun OS 5.8 and Perl version 5 in One server and Perl 5.8 in another unix server. I am able to read a file using fopen function of perl --file size having more then 3 GB of data.(In the machine where Perl 5.8 install) But when i am running the same perl script --It... (1 Reply)
Discussion started by: jambesh
1 Replies

5. Shell Programming and Scripting

Script help needed

I have a code given below... ERROR=`grep "Job Status" ${LOG_FILE}` ERROR=${ERROR##*\(} ERROR=${ERROR%%\)*} if then echo "The job completed successfully" EXIT_STATUS=0 else echo "The job failed" EXIT_STATUS=1 fi can anybody tell me what is ERROR=${ERROR##*\(}... (1 Reply)
Discussion started by: Sagarddd
1 Replies

6. Shell Programming and Scripting

script for reading logs of a script running on other UNIX server

Hi, I have a script, running on some outside firwall server and it's log of success or failure is maintained in a file. I want to write a script which ftp that server and reads that file and checks the logs and if failure , I will send mail notification. Please let meknow if I am not... (1 Reply)
Discussion started by: vandana.parwani
1 Replies

7. Shell Programming and Scripting

Script needed...

Hi! I have a file which has a list of host, I want to ssh to each of the first box for an app and grep through the logs for version of the application and look for a certain string "Connection is open" in the log file. The file I am referring to looks like this - ... (1 Reply)
Discussion started by: jacki
1 Replies

8. Shell Programming and Scripting

Expect script help needed- script failing if router unavailable

Hey all. Sometimes I'm tasked to change some router configs for the entire network (over 3,000 Cisco routers). Most of the time its a global config parameter so its done with a loop and an IP list as its the same configuration change for all routers. This is working OK. However, sometimes an... (3 Replies)
Discussion started by: mrkz1974
3 Replies

9. Shell Programming and Scripting

Help needed reading the file

I am reading a pipe delimted file having the 4 columns. The file content looks like APT|string|Application ID For App|value for env in `cat $ConfigFile` do name=`echo $env | cut -d '|' -f1` type=`echo $env | cut -d '|' -f2 prompt=`echo $env | cut -d '|' -f3` ... (5 Replies)
Discussion started by: chandu123
5 Replies

10. Shell Programming and Scripting

Help needed in reading line value into variable

I have a file which has data in 8 lines: 10 34 6 1 4 46 67 31 I am trying to read each value into each different variable so that I use these variables in preparing my report. Another option is to dynamically print each line values in the report like below: users with privA:... (2 Replies)
Discussion started by: sarat949
2 Replies
json::write(3tcl)						       JSON							 json::write(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
json::write - JSON generation SYNOPSIS
package require Tcl 8.5 package require json::write ?1.0.1? ::json::write indented ::json::write indented flag ::json::write aligned ::json::write aligned flag ::json::write string s ::json::write array arg... ::json::write object key value... _________________________________________________________________ DESCRIPTION
The json::write package provides a simple Tcl-only library for generation of text in the JSON http://www.json.org/ data exchange format as specified in RFC 4627 http://www.ietf.org/rfc/rfc4627.txt. COMMANDS
::json::write indented This method returns the current state of the indentation setting. ::json::write indented flag This and the method aligned configure the layout of the JSON generated by the package. If this flag is set (default) the package will break the generated JSON code across lines and indent it according to its inner structure, with each key of an object on a separate line. If this flag is not set, the whole JSON object will be written on a single line, with minimum spacing between all elements. ::json::write aligned This method returns the current state of the alignment setting. ::json::write aligned flag This and the method indented configure the layout of the JSON generated by the package. If this flag is set (default) the package ensures that the values for the keys in an object are vertically aligned with each other, for a nice table effect. To make this work this also implies that indented is set as well. If this flag is not set, the output is formatted as per the value of indented, without trying to align the values for object keys. ::json::write string s This method takes the string s and returns it properly quoted for JSON as its result. ::json::write array arg... This method takes a series of JSON formatted arguments and returns them as a properly formatted JSON array as its result. ::json::write object key value... This method takes a series of key/value arguments, the values already formatted for JSON, and returns them as a properly formatted JSON object as its result, with the keys formatted as JSON strings. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category json of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
data exchange, exchange format, javascript, json CATEGORY
CGI programming COPYRIGHT
Copyright (c) 2009-2011 Andreas Kupries <andreas_kupries@sourceforge.net> json 1.0.1 json::write(3tcl)
All times are GMT -4. The time now is 03:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy