bash -x ./post_to_commandlinefu.sh bash -x ./post_to_commandlinefu.sh + COMMAND='bash -x ./post_to_commandlinefu.sh' + echo 'command is bash -x ./post_to_commandlinefu.sh' command is bash -x ./post_to_commandlinefu.sh + '[' 'bash -x ./post_to_commandlinefu.sh' = '' ']' + SESSIONFILE=./.c + LOGINURL=http://www.commandlinefu.com/users/signin + EDITURL=http://www.commandlinefu.com/commands/edit ++ dirname ./.c ++ basename ./.c + find . -name .c -mtime +1 -exec rm '{}' ';' + '[' '!' -f ./.c ']' + echo -n 'Enter commandlinefu username: ' Enter commandlinefu username: + read USERNAME + echo -n 'Enter commandlinefu password: ' Enter commandlinefu password: + read -s PASSWORD + echo + wget -O - --save-cookies ./.c --keep-session-cookies --post-data 'username=&password=&remember=on&submit=Let me in!' http://www.commandlinefu.com/users/signin + echo -n 'Enter summary (required): ' Enter summary (required): + read SUMMARY runs a bash script in debugging mode ++ echo runs a bash script in debugging mode ++ cut -c1-154 + SUMMARY='runs a bash script in debugging mode' ++ echo bash -x ./post_to_commandlinefu.sh ++ cut -c1-254 + COMMAND='bash -x ./post_to_commandlinefu.sh' + echo 'post-data is command=bash -x ./post_to_commandlinefu.sh&summary=runs a bash script in debugging mode&submit=Save' post-data is command=bash -x ./post_to_commandlinefu.sh&summary=runs a bash script in debugging mode&submit=Save + wget -O - --load-cookies ./.c --post-data 'command=bash -x ./post_to_commandlinefu.sh&summary=runs a bash script in debugging mode&submit=Save&' http://www.commandlinefu.com/commands/edit + rm -f browse edit + rm -f '*17274*'
Sends both stdout and stderr to the pipe which captures the data in the file 'out.test' and sends to stdout of tee (likely /dev/tty unless redirected). Works on Bourne, Korn and Bash shells.
Display commands and their arguments as they are executed. Useful for debugging shell scripts. Show Sample Output
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
set -x; ls; ps; set +x
anjay
love love love love love